-
-
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
Update Code Splitting - Libraries #1276
Conversation
please feel free to discard
@@ -86,7 +86,7 @@ It is for this reason, that we will need to use the [CommonsChunkPlugin](/plugin | |||
|
|||
## `CommonsChunkPlugin` | |||
|
|||
This is a pretty complex plugin. It fundamentally allows us to extract all the common modules from different bundles and add them to the common bundle. If a common bundle does not exist, then it creates a new one. | |||
This is a pretty complex plugin. It fundamentally allows us to extract all the common modules from different bundles and adds them to a "common" bundle. If a common bundle does not exist, then it creates a new one. |
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.
I like this change but I think the whole sentence should be rewritten:
This plugin allows us to extract all duplicate (or "common") modules from different bundles into a "common" bundle. This "common" bundle can either be one that already exists (e.g. an entry bundle) or an entirely new one.
dropping that first bit about it being complex.
@@ -14,7 +14,7 @@ A typical application uses third party libraries for framework/functionality nee | |||
|
|||
Bundling application code with third party code would be inefficient. This is because the browser can cache asset files based on the cache header and files can be cached without needing to call the cdn again if its contents don't change. To take advantage of this, we want to keep the hash of the vendor files constant regardless of application code changes. | |||
|
|||
We can do this only when we separate the bundles for vendor and application code. | |||
We can do this only when we separate the bundles for vendor and application code. We walk you through with an example file that uses one of the popular dependencies. We show how the typical bundling process happens as we bundle our code with and without a helpful plugin -- `CommonsChunkPlugin` -- that we introduce in the walk-through. |
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.
I would drop this part for now as it feels a bit wordy -- we'll make sure everything's clear as we review and go through all the guides. #1273 is the start of the guides cleanup/review process.
please feel free to discard