You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/plugins/commons-chunk-plugin.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,3 +142,28 @@ new CommonsChunkPlugin({
142
142
// (3 children must share the module before it's separated)
143
143
})
144
144
```
145
+
146
+
### Passing the `minChunks` property a function
147
+
148
+
You also have the ability to pass the `minChunks` property a function. This function is called by the `CommonsChunkPlugin` and calls the function with `module` and `count` arguments.
149
+
150
+
The `module` property represents each module in the chunks you have provided via the `names` property.
151
+
152
+
The `count` property represents how many chunks the `module` is used in.
153
+
154
+
This option is useful when you want to have fine-grained control over how the CommonsChunk algorithm determins where modules should be moved to.
0 commit comments