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
Per output chunking #3645
Per output chunking #3645
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 #3645 +/- ##
==========================================
+ Coverage 96.54% 96.70% +0.15%
==========================================
Files 183 183
Lines 6245 6274 +29
Branches 1832 1827 -5
==========================================
+ Hits 6029 6067 +38
+ Misses 107 105 -2
+ Partials 109 102 -7
Continue to review full report at Codecov.
|
7e82a1a
to
cc56021
Compare
cc56021
to
786909a
Compare
bca9052
to
5acff41
Compare
Documentation and cleanup are done, this is now ready for release |
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Resolves #3467
Resolves #2701
Description
This is a HUGE refactoring that I have been wanting to do for ages. Basically what it does is that it moves the entire chunking logic from the build phase to the output generation phase. This fixes a long-standing bug (#3467) but also allows us to turn
inlineDynamicImports
preserveModules
manualChunks
into output options!
This allows the same build to generate e.g. an output with inlined imports together with a regular output etc. with little additional performance overhead. Or to do output specific optimizations via
output.manualChunks
.In the future, this may also enable Rollup to generate different chunks based on the format e.g. to deduplicate interop helpers (not implemented yet).
Performance overhead when generating several outputs with the same chunks should be reasonably small I hope.
This is ready for release, feedback welcome!