Skip to content

docs(config): Highlight merging of chunks when splitChunks.name is a … #2777

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 11, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/content/plugins/split-chunks-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ contributors:
- jacobangel
- madhavarshney
- sakhisheikh
- superburrito
related:
- title: webpack's automatic deduplication algorithm example
url: https://github.com/webpack/webpack/blob/master/examples/many-pages/README.md
Expand Down Expand Up @@ -164,7 +165,11 @@ T> `maxSize` takes higher priority than `maxInitialRequest/maxAsyncRequests`. Ac

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

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.
The name of the split chunk. Providing `true` will automatically generate a name based on chunks and cache group key.

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.

If the `splitChunks.name` matches an [entry point](/configuration/entry-context/#entry) name, the entry point will be removed.

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

Expand Down