Skip to content

Commit 9cd69e7

Browse files
committed
update
1 parent 17b4c4b commit 9cd69e7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tutorials/webpack-common-chunk/webpack.config.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ var webpack = require("webpack");
77
//utility1
88
//utility2
99
//utility3
10-
//pageA = polyfill + utility1 + utility2
11-
//pageB = polyfill + utility2 + utility3
12-
//pageC = polyfill + utility2 + utility3
10+
//pageA = polyfill + jQuery + underscore + utility1 + utility2
11+
//pageB = polyfill + jQuery + underscore + utility2 + utility3
12+
//pageC = polyfill + jQuery + underscore + utility2 + utility3
1313

1414
module.exports = {
1515
entry: {
@@ -60,7 +60,7 @@ module.exports = {
6060
// plugins: [
6161
// new webpack.optimize.CommonsChunkPlugin({
6262
// //顺序很重要
63-
// //If an array of strings is passed this is equal to invoking the plugin multiple times for each chunk name.
63+
// //If an array of strings is passed this is equal to invoking the plugin multiple times for each chunk name.
6464
// //common.js用于至少被2个entry都使用的公共模块,即common.js = polyfill + utility2.js + utility3.js
6565
// //init.js用于存储webpack runtime的代码,即init.js = webpack runtime
6666
// names: ["common", "init"],
@@ -93,6 +93,7 @@ module.exports = {
9393

9494
//http://stackoverflow.com/questions/35908253/webpack-how-to-bundle-entries-to-multiple-common-chunks-with-commonschunkplugin
9595
plugins: [
96+
//vender不经常变化,为了使用缓存,通过指定chunks把它单独弄出来,init包含webpack runtime和其他公共模块
9697
new webpack.optimize.CommonsChunkPlugin({
9798
name: "vendor",
9899
chunks: ["vendor"]

0 commit comments

Comments
 (0)