-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
Always used named chunks AND prevent split chunks from changing too often. #462
Always used named chunks AND prevent split chunks from changing too often. #462
Conversation
|
||
done(); | ||
}); | ||
}); |
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.
Test just moved
I just added an unrelated, second bug fix to this, because it uses much of the same code. It is described here: webpack/webpack#8426 Basically, when using |
…ing too often. (weaverryan) This PR was squashed before being merged into the master branch (closes #462). Discussion ---------- Always used named chunks AND prevent split chunks from changing too often. Fixes #461 But, this does not expose the entry names internally in the code (as these are used instead of auto-incremet ids). I don't think there's a way around that. Also, I'm still tracking down a somewhat related but that causes a related issue (meaningless id's changing in generated code) under very specific conditions. In fact, you can see it in this test case just by changing all the 3 of the entries to an array - e.g. ```js config.addEntry('main1', ['./js/code_splitting']); if (includeExtraEntry) { config.addEntry('main2', ['./js/eslint']); } config.addEntry('main3', ['./js/no_require']); ``` That doesn't need to block this PR, but I need to figure out the issue (it's Webpack behavior) and see if it affects versioning (i.e. if the contents change but the file hashes do NOT change, this is a BIG problem, otherwise, it's more of a minor, performance problem as filenames would just be changing too often). Commits ------- a8b6725 Making how the splitting works more consistent 4de5536 Fixing tests 13e07c6 linking to issue 7c96476 Fixing a bug where split filenames might change too often a426b8c Always used named chunks to avoid caching problems
@weaverryan are the split chunks named |
@stof I did a quick check and it seems to be fine. If the option that defines how chunks are named ( For instance, when adding
|
OK, then things are fine. |
Fixes #461
But, this does not expose the entry names internally in the code (as these are used instead of auto-incremet ids). I don't think there's a way around that.
Also, I'm still tracking down a somewhat related but that causes a related issue (meaningless id's changing in generated code) under very specific conditions. In fact, you can see it in this test case just by changing all the 3 of the entries to an array - e.g.
That doesn't need to block this PR, but I need to figure out the issue (it's Webpack behavior) and see if it affects versioning (i.e. if the contents change but the file hashes do NOT change, this is a BIG problem, otherwise, it's more of a minor, performance problem as filenames would just be changing too often).