Skip to content

Commit

Permalink
docs(plugins): update commons-chunk-plugin.md (#1560)
Browse files Browse the repository at this point in the history
Changed example to declare the plugin within `plugins` property.
  • Loading branch information
liorgreenb authored and skipjack committed Sep 10, 2017
1 parent a26cc70 commit 287e0e1
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/content/plugins/commons-chunk-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,18 @@ Split your code into vendor and application.
entry: {
vendor: ["jquery", "other-lib"],
app: "./entry"
}
new webpack.optimize.CommonsChunkPlugin({
name: "vendor",

// filename: "vendor.js"
// (Give the chunk a different name)
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({
name: "vendor",
// filename: "vendor.js"
// (Give the chunk a different name)

minChunks: Infinity,
// (with more entries, this ensures that no other module
// goes into the vendor chunk)
})
minChunks: Infinity,
// (with more entries, this ensures that no other module
// goes into the vendor chunk)
})
]
```
```html
Expand Down

0 comments on commit 287e0e1

Please sign in to comment.