Skip to content

Commit d5a507d

Browse files
committed
docs(config): Highlight merging of chunks when splitChunks.name is a specific string
1 parent c46a234 commit d5a507d

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 a string (or a function that always returns the same string) will merge all common modules and vendors into a single chunk. This probably leads to more code downloaded than needed.
171+
172+
If the name matches an entry point 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)