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
Switch to a code-splitting build and update dependencies #3020
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3020 +/- ##
==========================================
+ Coverage 88.63% 88.65% +0.02%
==========================================
Files 165 165
Lines 5693 5696 +3
Branches 1738 1738
==========================================
+ Hits 5046 5050 +4
Misses 388 388
+ Partials 259 258 -1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! I did the same for remarkable lately
https://github.com/jonschlinkert/remarkable/blob/master/rollup.config.js#L12
Great job! |
fcb7ebb
to
752dea1
Compare
…#3025) * Use id of last module in chunk as name base for auto-generated chunks * Unified file emission api (#2999) * Use new FileEmitter for basic cases around assets. TODO: Replace asset hooks completely, create tests for assets using the new hooks. * Migrate assets to new file emitter * Remove assetsById from Graph * Implement emitFile for assets * Internally use EmittedFile in the file emitter * Deprecate emitAsset and ROLLUP_ASSET_URL * Deprecate getAssetFileName * Merge chunk emission into unified API and deprecated previous API * Allow emitting files with fixed names * Support unnamed assets * Improve chunk name assignment * Initial support for chunk file names * Allow specifying explicit file names for emitted chunks * Fix some TODOs * Test ids remain stable when the transform hook is cached and make test more stable * Refine error handling * Test some more errors * Refine file emission * Refactor file emitter to have a single code path for asset finalization * Deduplicated emitted assets without a specific file name * Only use the alias as name for a manual chunk if the chunk is not facade for an entry point * Generate separate facades for duplicate named user-defined entry points * Always create facades for explicit file names * Test edge cases * Test and refactor handling of dynamic relative imports * Use async-await in generate function, remove error condition * Improve and test pattern validation * Test file emitter edge cases * Improve plugin error handling * Add documentation * Switch to a code-splitting build and update dependencies (#3020) * Switch to a code-splitting build and update dependencies * Fix case where default exports were not properly deconflicted against chunk names
This PR contains:
Are tests included?
Breaking Changes?
List any relevant issue numbers:
Description
Now that we had code-splitting for a long time, this will use code-splitting for Rollup's own build as well and deduplicate shared dependencies between the CLI and rollup itself for the Node CommonJS build.
This should save a few bytes and make us have a sip of our own medicine. The ESM and browser builds will not use code-splitting as there is nothing to share code with.
Also updates some dependencies.
The CLI code has been moved from
/bin/src
to/cli
(similar to how the browser code is in/browser
) and the built CLI has been moved from/bin/rollup
to/dist/bin/rollup
.