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

Switch to a code-splitting build and update dependencies #3020

Merged
merged 2 commits into from Aug 5, 2019

Conversation

lukastaegert
Copy link
Member

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no (at least not intentional)

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.

@codecov
Copy link

codecov bot commented Aug 3, 2019

Codecov Report

Merging #3020 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
cli/sourceMappingUrl.ts 100% <ø> (ø)
cli/run/index.ts 86.79% <ø> (ø)
cli/run/batchWarnings.ts 25.61% <ø> (ø)
cli/run/timings.ts 0% <ø> (ø)
cli/index.ts 57.14% <ø> (ø)
src/watch/index.ts 81.35% <ø> (ø) ⬆️
cli/run/loadConfigFile.ts 83.33% <ø> (ø)
cli/run/resetScreen.ts 62.5% <ø> (ø)
cli/logging.ts 78.94% <ø> (ø)
cli/run/watch.ts 41.97% <100%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2443783...4d4b3d1. Read the comment docs.

Copy link
Member

@TrySound TrySound left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lukastaegert
Copy link
Member Author

Great job!

@lukastaegert lukastaegert merged commit 871bfa0 into master Aug 5, 2019
@lukastaegert lukastaegert deleted the code-splitting-build branch August 5, 2019 14:57
lukastaegert added a commit that referenced this pull request Aug 5, 2019
…#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
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

Successfully merging this pull request may close these issues.

None yet

2 participants