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
Avoid dynamic facade chunks #3535
Conversation
Thank you for your contribution! ❤️You can try out this pull request locally by installing Rollup via
or load it into the REPL: |
Codecov Report
@@ Coverage Diff @@
## master #3535 +/- ##
==========================================
+ Coverage 96.22% 96.24% +0.01%
==========================================
Files 176 176
Lines 5984 6014 +30
Branches 1765 1773 +8
==========================================
+ Hits 5758 5788 +30
Misses 112 112
Partials 114 114
Continue to review full report at Codecov.
|
This is ready to be merged now |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Resolves #3125
Description
This will prevent the creation of facade chunks for dynamic imports to reduce the number of chunks. Previously, especially for more complex bundles, most dynamic imports would create an additional chunk that just contained re-exports to create the correct namespace for the import.
With this PR, this will no longer happen:
preserveEntrySignatures: 'strict'
, this one will be used by the import (this was already the old logic as well)I think this will a huge improvement to the chunking experience.
Additionally, this will also change the code generated for CommonJS dynamic imports from (REPL)
to (REPL)
This will fix a bug where the contents of the imported file are executed synchronously before the current synchronous block has finished executing. This could cause nasty issues when a dynamic import directly requires the currently executing file.