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

Prioritize manual chunk name over dynamic entry id #4040

Merged
merged 1 commit into from Apr 13, 2021

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

List any relevant issue numbers:
Resolves #3973

Description

If a manual chunk only contains a single dynamic entry point, the manual chunk name would be overridden by the name derived from the dynamic entry. As this is not in the user's interest, this will change the priorities to prefer the user-given name.
Now the only situation where a manual chunk will not receive the expected name is if there is a single explicitly defined entry point in the chunk (which is an optimisation to reduce the number of chunks).

@github-actions
Copy link

github-actions bot commented Apr 12, 2021

Thank you for your contribution! ❤️

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

npm install rollup/rollup#gh-3973_better_manual_chunk_names

or load it into the REPL:
https://rollupjs.org/repl/?circleci=14949

@codecov
Copy link

codecov bot commented Apr 12, 2021

Codecov Report

Merging #4040 (d078ef9) into master (345ae5d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4040   +/-   ##
=======================================
  Coverage   97.47%   97.48%           
=======================================
  Files         192      192           
  Lines        6785     6788    +3     
  Branches     1994     1996    +2     
=======================================
+ Hits         6614     6617    +3     
  Misses         84       84           
  Partials       87       87           
Impacted Files Coverage Δ
src/Chunk.ts 100.00% <100.00%> (ø)

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 345ae5d...d078ef9. Read the comment docs.

@lukastaegert lukastaegert merged commit 3078c61 into master Apr 13, 2021
@lukastaegert lukastaegert deleted the gh-3973_better_manual_chunk_names branch April 13, 2021 04:28
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.

Unexpected naming of chunks after manualChunks function
1 participant