Skip to content

Commit 1f675ba

Browse files
andrewdushaneskipjack
authored andcommitted
docs(plugins): clarify name/names for async commons chunk (#1345)
1 parent 4739033 commit 1f675ba

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

content/plugins/commons-chunk-plugin.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,16 +138,19 @@ Similar to the above one, but instead of moving common modules into the parent (
138138
139139
```javascript
140140
new webpack.optimize.CommonsChunkPlugin({
141-
// names: ["app", "subPageA"]
142-
// (choose the chunks, or omit for all chunks)
141+
name: "app",
142+
// or
143+
names: ["app", "subPageA"]
144+
// the name or list of names must match the name or names
145+
// of the entry points that create the async chunks
143146

144147
children: true,
145148
// (use all children of the chunk)
146149

147150
async: true,
148151
// (create an async commons chunk)
149152

150-
// minChunks: 3,
153+
minChunks: 3,
151154
// (3 children must share the module before it's separated)
152155
})
153156
```

0 commit comments

Comments
 (0)