Skip to content

Commit b613835

Browse files
benthemonkeymontogeek
authored andcommitted
docs(plugins): Specify all inputs to cacheGroup.name (#2719)
Here's where `cacheGroup.name` get invoked, being passed chunks and cacheGroup: https://github.com/webpack/webpack/blob/master/lib/optimize/SplitChunksPlugin.js#L470
1 parent 9dc398b commit b613835

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ T> `maxSize` takes higher priority than `maxInitialRequest/maxAsyncRequests`. Ac
162162

163163
### `splitChunks.name`
164164

165-
`boolean: true | function (module) | string`
165+
`boolean: true | function (module, chunks, cacheGroupKey) | string`
166166

167167
The name of the split chunk. Providing `true` will automatically generate a name based on chunks and cache group key. Providing a string or function will allow you to use a custom name. If the name matches an entry point name, the entry point will be removed.
168168

@@ -175,7 +175,7 @@ module.exports = {
175175
//...
176176
optimization: {
177177
splitChunks: {
178-
name (module) {
178+
name (module, chunks, cacheGroupKey) {
179179
// generate a chunk name...
180180
return; //...
181181
}

0 commit comments

Comments
 (0)