Skip to content

Commit 287e0e1

Browse files
liorgreenbskipjack
authored andcommitted
docs(plugins): update commons-chunk-plugin.md (#1560)
Changed example to declare the plugin within `plugins` property.
1 parent a26cc70 commit 287e0e1

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/content/plugins/commons-chunk-plugin.md

+11-10
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,18 @@ Split your code into vendor and application.
9898
entry: {
9999
vendor: ["jquery", "other-lib"],
100100
app: "./entry"
101-
}
102-
new webpack.optimize.CommonsChunkPlugin({
103-
name: "vendor",
104-
105-
// filename: "vendor.js"
106-
// (Give the chunk a different name)
101+
},
102+
plugins: [
103+
new webpack.optimize.CommonsChunkPlugin({
104+
name: "vendor",
105+
// filename: "vendor.js"
106+
// (Give the chunk a different name)
107107

108-
minChunks: Infinity,
109-
// (with more entries, this ensures that no other module
110-
// goes into the vendor chunk)
111-
})
108+
minChunks: Infinity,
109+
// (with more entries, this ensures that no other module
110+
// goes into the vendor chunk)
111+
})
112+
]
112113
```
113114
114115
```html

0 commit comments

Comments
 (0)