Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split packages also consider their internal modules external #1039

Open
svnhub opened this issue Jan 16, 2025 · 0 comments
Open

Split packages also consider their internal modules external #1039

svnhub opened this issue Jan 16, 2025 · 0 comments

Comments

@svnhub
Copy link

svnhub commented Jan 16, 2025

When using * in front of the package name to make all dependencies external the kind of packages that are split will also seemingly consider their own internal modules external. This means the import map in browsers will need to include the internal package name with weird letters in the map.

Is this intentional?

For example @monogrid/gainmap
https://esm.sh/*@monogrid/gainmap-js@3.1.0/es2022/gainmap-js.mjs (this depends on @monogrid/gainmap-js/dist/QuadRenderer-DuOPRGA4)
https://esm.sh/@monogrid/gainmap-js@3.1.0/es2022/gainmap-js.mjs (this depends on ./dist/QuadRenderer-DuOPRGA4.mjs)

Also @use-gesture/core
https://esm.sh/*@use-gesture/core@10.3.1/es2022/core.mjs (this depends on @use-gesture/core/dist/actions-fe213e88.esm which in turn depends on @use-gesture/core@10.3.1/es2022/dist/maths-0ab39ae9.esm.mjs)
https://esm.sh/@use-gesture/core@10.3.1/es2022/core.mjs (this depends on relative module ./dist/actions-fe213e88.esm.mjs which in turn depends on relative module ./maths-0ab39ae9.esm.mjs)

Edit: This issue may overlap (or even be a duplicate of) #925 - at least the resulting problem is the same:
It is really hard to know ahead-of-time what the "internal externals" are going to be named because the names are not in any package.json and they include seemingly random letters. So far we have been just letting the import fail, note the name and manually added them to the import map.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant