Skip to content

Commit ed00e58

Browse files
yaaoooEugeneHlushko
authored andcommitted
docs(config): Highlight merging of chunks when splitChunks.name is a … (#2777)
1 parent 278854a commit ed00e58

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ contributors:
1010
- jacobangel
1111
- madhavarshney
1212
- sakhisheikh
13+
- superburrito
1314
related:
1415
- title: webpack's automatic deduplication algorithm example
1516
url: https://github.com/webpack/webpack/blob/master/examples/many-pages/README.md
@@ -164,7 +165,11 @@ T> `maxSize` takes higher priority than `maxInitialRequest/maxAsyncRequests`. Ac
164165

165166
`boolean: true | function (module, chunks, cacheGroupKey) | string`
166167

167-
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.
168+
The name of the split chunk. Providing `true` will automatically generate a name based on chunks and cache group key.
169+
170+
Providing a string or a function allows you to use a custom name. Specifying either a string or a function that always returns the same string will merge all common modules and vendors into a single chunk. This might lead to bigger initial downloads and slow down page loads.
171+
172+
If the `splitChunks.name` matches an [entry point](/configuration/entry-context/#entry) name, the entry point will be removed.
168173

169174
T> It is recommended to set `splitChunks.name` to `false` for production builds so that it doesn't change names unnecessarily.
170175

0 commit comments

Comments
 (0)