@@ -135,7 +135,7 @@ __webpack.config.js__
135
135
- })
136
136
+ }),
137
137
+ new webpack.optimize.CommonsChunkPlugin({
138
- + name: 'runtime '
138
+ + name: 'manifest '
139
139
+ })
140
140
],
141
141
output: {
@@ -145,16 +145,16 @@ __webpack.config.js__
145
145
};
146
146
```
147
147
148
- Let's run another build to see the extracted ` runtime ` bundle:
148
+ Let's run another build to see the extracted ` manifest ` bundle:
149
149
150
150
``` bash
151
151
Hash: 80552632979856ddab34
152
152
Version: webpack 3.3.0
153
153
Time: 1512ms
154
- Asset Size Chunks Chunk Names
155
- main.5ec8e954e32d66dee1aa.js 542 kB 0 [emitted] [big] main
156
- runtime .719796322be98041fff2.js 5.82 kB 1 [emitted] runtime
157
- index.html 275 bytes [emitted]
154
+ Asset Size Chunks Chunk Names
155
+ main.5ec8e954e32d66dee1aa.js 542 kB 0 [emitted] [big] main
156
+ manifest .719796322be98041fff2.js 5.82 kB 1 [emitted] manifest
157
+ index.html 275 bytes [emitted]
158
158
[0] ./src/index.js 336 bytes {0} [built]
159
159
[2] (webpack)/buildin/global.js 509 bytes {0} [built]
160
160
[3] (webpack)/buildin/module.js 517 bytes {0} [built]
@@ -188,7 +188,7 @@ __webpack.config.js__
188
188
+ name: 'vendor'
189
189
+ }),
190
190
new webpack.optimize.CommonsChunkPlugin({
191
- name: 'runtime '
191
+ name: 'manifest '
192
192
})
193
193
],
194
194
output: {
@@ -198,19 +198,19 @@ __webpack.config.js__
198
198
};
199
199
```
200
200
201
- W> Note that order matters here. The ` 'vendor' ` instance of the ` CommonsChunkPlugin ` must be included prior to the ` 'runtime ' ` instance.
201
+ W> Note that order matters here. The ` 'vendor' ` instance of the ` CommonsChunkPlugin ` must be included prior to the ` 'manifest ' ` instance.
202
202
203
203
Let's run another build to see our new ` vendor ` bundle:
204
204
205
205
``` bash
206
206
Hash: 69eb92ebf8935413280d
207
207
Version: webpack 3.3.0
208
208
Time: 1502ms
209
- Asset Size Chunks Chunk Names
210
- vendor.8196d409d2f988123318.js 541 kB 0 [emitted] [big] vendor
211
- main.0ac0ae2d4a11214ccd19.js 791 bytes 1 [emitted] main
212
- runtime .004a1114de8bcf026622.js 5.85 kB 2 [emitted] runtime
213
- index.html 352 bytes [emitted]
209
+ Asset Size Chunks Chunk Names
210
+ vendor.8196d409d2f988123318.js 541 kB 0 [emitted] [big] vendor
211
+ main.0ac0ae2d4a11214ccd19.js 791 bytes 1 [emitted] main
212
+ manifest .004a1114de8bcf026622.js 5.85 kB 2 [emitted] manifest
213
+ index.html 352 bytes [emitted]
214
214
[1] ./src/index.js 336 bytes {1} [built]
215
215
[2] (webpack)/buildin/global.js 509 bytes {0} [built]
216
216
[3] (webpack)/buildin/module.js 517 bytes {0} [built]
@@ -269,11 +269,11 @@ Running another build, we would expect only our `main` bundle's hash to change,
269
269
Hash: d38a06644fdbb898d795
270
270
Version: webpack 3.3.0
271
271
Time: 1445ms
272
- Asset Size Chunks Chunk Names
273
- vendor.a7561fb0e9a071baadb9.js 541 kB 0 [emitted] [big] vendor
274
- main.b746e3eb72875af2caa9.js 1.22 kB 1 [emitted] main
275
- runtime .1400d5af64fc1b7b3a45.js 5.85 kB 2 [emitted] runtime
276
- index.html 352 bytes [emitted]
272
+ Asset Size Chunks Chunk Names
273
+ vendor.a7561fb0e9a071baadb9.js 541 kB 0 [emitted] [big] vendor
274
+ main.b746e3eb72875af2caa9.js 1.22 kB 1 [emitted] main
275
+ manifest .1400d5af64fc1b7b3a45.js 5.85 kB 2 [emitted] manifest
276
+ index.html 352 bytes [emitted]
277
277
[1] ./src/index.js 421 bytes {1} [built]
278
278
[2] (webpack)/buildin/global.js 509 bytes {0} [built]
279
279
[3] (webpack)/buildin/module.js 517 bytes {0} [built]
@@ -286,7 +286,7 @@ runtime.1400d5af64fc1b7b3a45.js 5.85 kB 2 [emitted] runtime
286
286
287
287
- The ` main ` bundle changed because of its new content.
288
288
- The ` vendor ` bundle changed because its ` module.id ` was changed.
289
- - And, the ` runtime ` bundle changed because it now contains a reference to a new module.
289
+ - And, the ` manifest ` bundle changed because it now contains a reference to a new module.
290
290
291
291
The first and last are expected -- it's the ` vendor ` hash we want to fix. Luckily, there are two plugins we can use to resolve this issue. The first is the [ ` NamedModulesPlugin ` ] ( /plugins/named-modules-plugin ) , which will use the path to the module rather than a numerical identifier. While this plugin is useful during development for more readable output, it does take a bit longer to run. The second option is the [ ` HashedModuleIdsPlugin ` ] ( /plugins/hashed-module-ids-plugin ) , which is recommended for production builds:
292
292
@@ -315,7 +315,7 @@ __webpack.config.js__
315
315
name: 'vendor'
316
316
}),
317
317
new webpack.optimize.CommonsChunkPlugin({
318
- name: 'runtime '
318
+ name: 'manifest '
319
319
})
320
320
],
321
321
output: {
@@ -331,11 +331,11 @@ Now, despite any new local dependencies, our `vendor` hash should stay consisten
331
331
Hash: 1f49b42afb9a5acfbaff
332
332
Version: webpack 3.3.0
333
333
Time: 1372ms
334
- Asset Size Chunks Chunk Names
335
- vendor.eed6dcc3b30cfa138aaa.js 541 kB 0 [emitted] [big] vendor
336
- main.d103ac311788fcb7e329.js 1.22 kB 1 [emitted] main
337
- runtime .d2a6dc1ccece13f5a164.js 5.85 kB 2 [emitted] runtime
338
- index.html 352 bytes [emitted]
334
+ Asset Size Chunks Chunk Names
335
+ vendor.eed6dcc3b30cfa138aaa.js 541 kB 0 [emitted] [big] vendor
336
+ main.d103ac311788fcb7e329.js 1.22 kB 1 [emitted] main
337
+ manifest .d2a6dc1ccece13f5a164.js 5.85 kB 2 [emitted] manifest
338
+ index.html 352 bytes [emitted]
339
339
[3Di9] ./src/print.js 62 bytes {1} [built]
340
340
[3IRH] (webpack)/buildin/module.js 517 bytes {0} [built]
341
341
[DuR2] (webpack)/buildin/global.js 509 bytes {0} [built]
@@ -373,11 +373,11 @@ And finally run our build again:
373
373
Hash: 37e1358f135c0b992f72
374
374
Version: webpack 3.3.0
375
375
Time: 1557ms
376
- Asset Size Chunks Chunk Names
377
- vendor.eed6dcc3b30cfa138aaa.js 541 kB 0 [emitted] [big] vendor
378
- main.fc7f38e648da79db2aba.js 891 bytes 1 [emitted] main
379
- runtime .bb5820632fb66c3fb357.js 5.85 kB 2 [emitted] runtime
380
- index.html 352 bytes [emitted]
376
+ Asset Size Chunks Chunk Names
377
+ vendor.eed6dcc3b30cfa138aaa.js 541 kB 0 [emitted] [big] vendor
378
+ main.fc7f38e648da79db2aba.js 891 bytes 1 [emitted] main
379
+ manifest .bb5820632fb66c3fb357.js 5.85 kB 2 [emitted] manifest
380
+ index.html 352 bytes [emitted]
381
381
[3IRH] (webpack)/buildin/module.js 517 bytes {0} [built]
382
382
[DuR2] (webpack)/buildin/global.js 509 bytes {0} [built]
383
383
[0] multi lodash 28 bytes {0} [built]
0 commit comments