Skip to content

Commit 8c64ac6

Browse files
cool88skipjack
authored andcommitted
docs(guides): make code-splitting sentence a bit more readable (webpack#1260)
1 parent 98474e8 commit 8c64ac6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

content/guides/code-splitting-libraries.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,10 @@ module.exports = function() {
154154
## Manifest File
155155

156156
But, if we change application code and run `webpack` again, we see that the hash for the vendor file changes. Even though we achieved separate bundles for `vendor` and `main` bundles, we see that the `vendor` bundle changes when the application code changes.
157+
157158
This means that we still don't reap the benefits of browser caching because the hash for vendor file changes on every build and the browser will have to reload the file.
158159

159-
The issue here is that on every build, webpack generates some webpack runtime code, which helps webpack do its job. When there is a single bundle, the runtime code resides in it. But when multiple bundles are generated, the runtime code is extracted into the common module, here the `vendor` file.
160+
The issue here is that on every build, webpack generates some webpack runtime code, which helps webpack do its job. When there is a single bundle, the runtime code resides in it. But when multiple bundles are generated, the runtime code is extracted into the common module -- the `vendor` file in this example.
160161

161162
To prevent this, we need to extract out the runtime into a separate manifest file. Even though we are creating another bundle, the overhead is offset by the long term caching benefits that we obtain on the `vendor` file.
162163

0 commit comments

Comments
 (0)