Skip to content

Commit 111fe93

Browse files
EugeneHlushkomontogeek
authored andcommitted
docs(plugins) Fix reuseExistingChunk title nesting (#2526)
* docs(plugins) scp reuseExistingChunk title nesting fix * docs(plugins) scp reuseExistingChunk title notation
1 parent b77b222 commit 111fe93

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

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

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,27 @@ module.exports = {
201201

202202
A module can belong to multiple cache groups. The optimization will prefer the cache group with a higher `priority`. The default groups have a negative priority to allow custom groups to take higher priority (default value is `0` for custom groups).
203203

204-
#### `splitChunks.cacheGroups.reuseExistingChunk`
204+
#### `splitChunks.cacheGroups.{cacheGroup}.reuseExistingChunk`
205205

206206
`boolean`
207207

208208
If the current chunk contains modules already split out from the main bundle, it will be reused instead of a new one being generated. This can impact the resulting file name of the chunk.
209209

210+
```js
211+
module.exports = {
212+
//...
213+
optimization: {
214+
splitChunks: {
215+
cacheGroups: {
216+
vendors: {
217+
reuseExistingChunk: true
218+
}
219+
}
220+
}
221+
}
222+
};
223+
```
224+
210225
#### `splitChunks.cacheGroups.test`
211226

212227
`function` `RegExp` `string`

0 commit comments

Comments
 (0)