-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
externalized export * of package from sub file does not emit in bundle #1521
Comments
@evanw Any ideas here? This is a very common situation; we actually want to recommend that consumer code removes file path imports and minimizes the dependencies to package imports, but this particular bug blocks that because packages like Fluent UI have the entry point Our workaround is to modify consumer code to directly import from |
@evanw wondering if we should dig into the code and try to fix and submit a PR, or if you possibly know where the issue is. Any starter tips on where we should start looking would be appreciated :) |
Closing, reopened #1737. |
We are trying to create ESM bundles for any given package by externalizing dependencies. We're seeing the bundles unconsumable by the browser when the source exports * from an external dependency anywhere other than the root entry file. Repros on 0.12.20.
Setup:
index.js
exports all named exports from utilities:./utilities.js exports all named exports from the
foo
package (to be externalized):I create an esm bundle with
utilities.js
directly which externalizesfoo
:Result in out.js (as expected):
Now, create the same bundle but pointing to
index.js
:I expect exactly the same output. Instead there is no
export * from 'foo'
anywhere, and as such consumers can't access the named exports fromfoo
.I can't seem to create a correct esm bundle for a package if it re-exports another package anywhere other than the entrypoint.
The text was updated successfully, but these errors were encountered: