Repository navigation
Add "single" option to RuntimeChunkPlugin - #6384
Merged
Merged
Conversation
ooflorent
reviewed
Jan 27, 2018
| }, | ||
| { | ||
| "enum": [ | ||
| "single" |
Contributor
There was a problem hiding this comment.
Please also add the counterpart
Contributor
Author
There was a problem hiding this comment.
Do you mean I should add another string option called multiple?
change runtime chunk naming schema
Contributor
|
Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon. |
sokra
approved these changes
Feb 5, 2018
Member
|
Thanks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Add config option
optimization.runtimeChunk: 'single'to generate a single runtime chunk for all entrypoints instead of each entrypoint getting their own runtime.Did you add tests for your changes?
Basic tests for the existence of runtime files, nothing that tests that the contents of the runtime file are generated correctly.
If relevant, link to documentation update:
Summary
My company's webpack setup involves including multiple entrypoint files on a page, so adding a separate runtime chunk for each entrypoint results in too many parallel loading chunks.
See @sokra's comment in the alpha.5 issue: #6357 (comment)
Does this PR introduce a breaking change?
No, just a new option in the config and the RuntimeChunkPlugin.
Other information
Let me know if you approve of the way I am handling passing in the option. Once I get a 👍 I'll update docs and add tests. I mostly wanted to make sure you won't want to allow a custom name for the runtime chunk.