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

Support emitting files via manualChunks in output #4761

merged 2 commits into from Dec 22, 2022


Copy link

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

List any relevant issue numbers:


This changes the logic for emitting files to handle files emitted during output generation phase via a transform hooks that is triggered for the first time by the manualChunks option of that output. This may not be exactly what users expect, but it is difficult to differentiate legitimate uses of the file emitter from illegitimate uses, especially with new features in the pipeline.
As a follow-up, it would be worthwhile to add a way for assets to obey tree-shaking in so far that assets that are never referenced are not emitted.

Copy link

github-actions bot commented Dec 21, 2022

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install rollup/rollup#gh-4746-emit-via-manual-chunk

or load it into the REPL:

Copy link

codecov bot commented Dec 21, 2022

Codecov Report

Merging #4761 (2e4753e) into master (7182a92) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #4761   +/-   ##
  Coverage   99.03%   99.03%           
  Files         217      217           
  Lines        7749     7762   +13     
  Branches     2147     2148    +1     
+ Hits         7674     7687   +13     
  Misses         24       24           
  Partials       51       51           
Impacted Files Coverage Δ
src/utils/FileEmitter.ts 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@lukastaegert lukastaegert merged commit d750ef2 into master Dec 22, 2022
10 checks passed
@lukastaegert lukastaegert deleted the gh-4746-emit-via-manual-chunk branch December 22, 2022 05:17
Copy link

This PR has been released as part of rollup@3.8.0. You can test it via npm install rollup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

can't access emitted filename if that file was emitted in a file that only exists in manualChunk
2 participants