Skip to content

Commit cdc42e4

Browse files
EugeneHlushkomontogeek
authored andcommitted
docs(plugins) Document splitChunks cacheGroup enforce option (#2645)
Fixes #2644
1 parent 29efde5 commit cdc42e4

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/content/plugins/split-chunks-plugin.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,29 @@ module.exports = {
284284
};
285285
```
286286

287+
#### `splitChunks.cacheGroups.{cacheGroup}.enforce`
288+
289+
`boolean: false`
290+
291+
Tells webpack to ignore [`splitChunks.minSize`](#splitchunks-minsize), [`splitChunks.maxSize`](#splitchunks-maxsize), [`splitChunks.minChunks`](#splitchunks-minchunks), [`splitChunks.maxAsyncRequests`](#splitchunks-maxasyncrequests) and [`splitChunks.maxInitialRequests`](#splitchunks-maxinitialrequests) options and always create chunks for this cache group.
292+
293+
__webpack.config.js__
294+
295+
```js
296+
module.exports = {
297+
//...
298+
optimization: {
299+
splitChunks: {
300+
cacheGroups: {
301+
vendors: {
302+
enforce: true
303+
}
304+
}
305+
}
306+
}
307+
};
308+
```
309+
287310
## Examples
288311

289312
### Defaults: Example 1

0 commit comments

Comments
 (0)