Skip to content

Commit 4d4ce10

Browse files
docs(plugins): add splitChunks.minSizeReduction (webpack#5614)
Co-authored-by: Eugene Hlushko <[email protected]>
1 parent eeadfde commit 4d4ce10

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ contributors:
1818
- rohrlaf
1919
- jamesgeorge007
2020
- anshumanv
21+
- snitin315
2122
related:
2223
- title: webpack's automatic deduplication algorithm example
2324
url: https://github.com/webpack/webpack/blob/master/examples/many-pages/README.md
@@ -167,10 +168,18 @@ Prevents exposing path info when creating names for parts splitted by maxSize.
167168

168169
### splitChunks.minSize
169170

170-
`number = 20000`
171+
`number = 20000` `{ [index: string]: number }`
171172

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

175+
### splitChunks.minSizeReduction
176+
177+
`number` `{ [index: string]: number }`
178+
179+
Minimum size reduction to the main chunk (bundle), in bytes, needed for a chunk to be generated. Meaning if splitting into a chunk does not reduce the size of the main chunk (bundle) by the given amount of bytes, it won't be split, even if it meets the `splitChunks.minSize` value.
180+
181+
T> Both `splitChunks.minSizeReduction` and `splitChunks.minSize` need to be fulfilled for a chunk to be generated.
182+
174183
### splitChunks.enforceSizeThreshold
175184

176185
#### `splitChunks.cacheGroups.{cacheGroup}.enforceSizeThreshold`

0 commit comments

Comments
 (0)