-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Guides - Tweak Code Splitting to Extract Boilerplate #1782
Comments
More found here, but the piece of information is parasited with the Copy-pasting that example would lead in a index1.js
index2.js
|
Yes, I believe you're correct that that two instances of the |
Hey :) Thanks about that answer and sorry for the delay. I might have a chance to take time today :) I'll keep in touch |
@cyrilchapon Still interested? |
This aint valid anymore, CCP is deprecated |
Expanding on #1333
This page states that
This is actually incorrect. It extracts "what we want" (ie. the webpack boilerplate, in this section called "extracting webpack boilerplate"), indeed by "specifying a name not mentioned in the entry configuration", but only along with "creating another CommonChunkPlugin" before..
I may be stupid, but I spent 2 weeks struggling on it because I wouldn't find this piece of information, and I ended finding it inside the (closed, merged) issue mentionned above, so I think community could benefit from this experience :)
Even the provided example only works as long as we don't have any dependency :
In my simple case, this produces a 500Kb
manifest.js
with Zepto, lodash, and typically every stuff I'm aiming to eliminate from this base, common, synchronously imported, render blocking, non-changing, cached bundle... 😆As @jakearchibald stated in his issue, there must be another CommonChunkPlugin that takes the rest, placed before, for this to work :
I'm pretty new to webpack so, feel free to correct me if I'm wrong.
But as a newbie on this, this experience shall be a good show case and test case for documentation.
The text was updated successfully, but these errors were encountered: