Skip to content
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

docs(plugins): add splitChunks.minSizeReduction #5614

Merged
merged 3 commits into from Nov 14, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/content/plugins/split-chunks-plugin.mdx
Expand Up @@ -18,6 +18,7 @@ contributors:
- rohrlaf
- jamesgeorge007
- anshumanv
- snitin315
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 @@ -165,10 +166,18 @@ Prevents exposing path info when creating names for parts splitted by maxSize.

### splitChunks.minSize

`number = 20000`
`number = 20000` `{ [index: string]: number }`

Minimum size, in bytes, for a chunk to be generated.

### splitChunks.minSizeReduction

`number` `{ [index: string]: number }`

Minimum size reduction to the whole compilation, in bytes, needed for a chunk to be generated.
snitin315 marked this conversation as resolved.
Show resolved Hide resolved

T> Both `splitChunks.minSizeReduction` and `splitChunks.minSize` need to be fulfilled for a chunk to be generated. You may want to reduce `minSize` when using `minSizeReduction`.
snitin315 marked this conversation as resolved.
Show resolved Hide resolved

### splitChunks.enforceSizeThreshold

#### `splitChunks.cacheGroups.{cacheGroup}.enforceSizeThreshold`
Expand Down