Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5cac4f9

Browse files
committed
Update WebpackOptions
1 parent 663a26d commit 5cac4f9

File tree

4 files changed

+22
-16
lines changed

4 files changed

+22
-16
lines changed

declarations/WebpackOptions.d.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,7 +1782,8 @@ export interface OptimizationSplitChunksOptions {
17821782
*/
17831783
chunks?:
17841784
| ("initial" | "async" | "all")
1785-
| ((chunk: import("../lib/Chunk")) => boolean) | RegExp;
1785+
| RegExp
1786+
| ((chunk: import("../lib/Chunk")) => boolean);
17861787
/**
17871788
* Sets the size types which are used when a number is used for sizes.
17881789
*/
@@ -1804,7 +1805,8 @@ export interface OptimizationSplitChunksOptions {
18041805
*/
18051806
chunks?:
18061807
| ("initial" | "async" | "all")
1807-
| ((chunk: import("../lib/Chunk")) => boolean) | RegExp;
1808+
| RegExp
1809+
| ((chunk: import("../lib/Chunk")) => boolean);
18081810
/**
18091811
* Maximal size hint for the on-demand chunks.
18101812
*/
@@ -1897,7 +1899,8 @@ export interface OptimizationSplitChunksCacheGroup {
18971899
*/
18981900
chunks?:
18991901
| ("initial" | "async" | "all")
1900-
| ((chunk: import("../lib/Chunk")) => boolean) | RegExp;
1902+
| RegExp
1903+
| ((chunk: import("../lib/Chunk")) => boolean);
19011904
/**
19021905
* Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group.
19031906
*/

schemas/WebpackOptions.check.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schemas/WebpackOptions.json

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2626,11 +2626,12 @@
26262626
"enum": ["initial", "async", "all"]
26272627
},
26282628
{
2629-
"instanceof": "Function",
2630-
"tsType": "((chunk: import('../lib/Chunk')) => boolean)"
2629+
"instanceof": "RegExp",
2630+
"tsType": "RegExp"
26312631
},
26322632
{
2633-
"instanceof": "RegExp"
2633+
"instanceof": "Function",
2634+
"tsType": "((chunk: import('../lib/Chunk')) => boolean)"
26342635
}
26352636
]
26362637
},
@@ -2876,11 +2877,12 @@
28762877
"enum": ["initial", "async", "all"]
28772878
},
28782879
{
2879-
"instanceof": "Function",
2880-
"tsType": "((chunk: import('../lib/Chunk')) => boolean)"
2880+
"instanceof": "RegExp",
2881+
"tsType": "RegExp"
28812882
},
28822883
{
2883-
"instanceof": "RegExp"
2884+
"instanceof": "Function",
2885+
"tsType": "((chunk: import('../lib/Chunk')) => boolean)"
28842886
}
28852887
]
28862888
},
@@ -2918,11 +2920,12 @@
29182920
"enum": ["initial", "async", "all"]
29192921
},
29202922
{
2921-
"instanceof": "Function",
2922-
"tsType": "((chunk: import('../lib/Chunk')) => boolean)"
2923+
"instanceof": "RegExp",
2924+
"tsType": "RegExp"
29232925
},
29242926
{
2925-
"instanceof": "RegExp"
2927+
"instanceof": "Function",
2928+
"tsType": "((chunk: import('../lib/Chunk')) => boolean)"
29262929
}
29272930
]
29282931
},

types.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8691,7 +8691,7 @@ declare interface OptimizationSplitChunksCacheGroup {
86918691
/**
86928692
* Select chunks for determining cache group content (defaults to "initial", "initial" and "all" requires adding these chunks to the HTML).
86938693
*/
8694-
chunks?: "all" | "initial" | "async" | ((chunk: Chunk) => boolean) | RegExp;
8694+
chunks?: RegExp | "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
86958695

86968696
/**
86978697
* Ignore minimum size, minimum chunks and maximum requests and always create chunks for this cache group.
@@ -8818,7 +8818,7 @@ declare interface OptimizationSplitChunksOptions {
88188818
/**
88198819
* Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).
88208820
*/
8821-
chunks?: "all" | "initial" | "async" | ((chunk: Chunk) => boolean) | RegExp;
8821+
chunks?: RegExp | "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
88228822

88238823
/**
88248824
* Sets the size types which are used when a number is used for sizes.
@@ -8841,7 +8841,7 @@ declare interface OptimizationSplitChunksOptions {
88418841
/**
88428842
* Select chunks for determining shared modules (defaults to "async", "initial" and "all" requires adding these chunks to the HTML).
88438843
*/
8844-
chunks?: "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
8844+
chunks?: RegExp | "all" | "initial" | "async" | ((chunk: Chunk) => boolean);
88458845
/**
88468846
* Maximal size hint for the on-demand chunks.
88478847
*/

0 commit comments

Comments
 (0)