Skip to content

Commit 64a5b43

Browse files
docs(plugins): set the correct default value for splitChunks.chunks (#3908)
1 parent f4548e2 commit 64a5b43

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ contributors:
1515
- snitin315
1616
- chenxsan
1717
- rohrlaf
18+
- jamesgeorge007
1819
related:
1920
- title: webpack's automatic deduplication algorithm example
2021
url: https://github.com/webpack/webpack/blob/master/examples/many-pages/README.md
@@ -59,7 +60,7 @@ module.exports = {
5960
//...
6061
optimization: {
6162
splitChunks: {
62-
chunks: 'all',
63+
chunks: 'async',
6364
minSize: 20000,
6465
minRemainingSize: 0,
6566
maxSize: 0,
@@ -96,7 +97,7 @@ By default webpack will generate names using origin and name of the chunk (e.g.
9697

9798
### `splitChunks.chunks`
9899

99-
`string = 'all'` `function (chunk)`
100+
`string = 'async'` `function (chunk)`
100101

101102
This indicates which chunks will be selected for optimization. When a string is provided, valid values are `all`, `async`, and `initial`. Providing `all` can be particularly powerful, because it means that chunks can be shared even between async and non-async chunks.
102103

0 commit comments

Comments
 (0)