mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-05-29 15:44:31 +00:00
Webpack: Adds maxSize as option to CacheGroupsOptions and SplitChunksOptions (#29401)
* Adds maxSize as option to CacheGroups and SplitChunks * Adds test for maxSize * Adds another minSize/maxSize test and modifies original amount
This commit is contained in:
committed by
John Reilly
parent
8607133d93
commit
fa5666117a
4
types/webpack/index.d.ts
vendored
4
types/webpack/index.d.ts
vendored
@@ -576,6 +576,8 @@ declare namespace webpack {
|
||||
priority?: number;
|
||||
/** Minimal size for the created chunk */
|
||||
minSize?: number;
|
||||
/** Maximum size for the created chunk */
|
||||
maxSize?: number;
|
||||
/** Minimum number of times a module has to be duplicated until it's considered for splitting */
|
||||
minChunks?: number;
|
||||
/** Maximum number of requests which are accepted for on-demand loading */
|
||||
@@ -592,6 +594,8 @@ declare namespace webpack {
|
||||
chunks?: "initial" | "async" | "all" | ((chunk: compilation.Chunk) => boolean);
|
||||
/** Minimal size for the created chunk */
|
||||
minSize?: number;
|
||||
/** Maximum size for the created chunk */
|
||||
maxSize?: number;
|
||||
/** Minimum number of times a module has to be duplicated until it's considered for splitting */
|
||||
minChunks?: number;
|
||||
/** Maximum number of requests which are accepted for on-demand loading */
|
||||
|
||||
@@ -632,12 +632,16 @@ configuration = {
|
||||
mode: "production",
|
||||
optimization: {
|
||||
splitChunks: {
|
||||
minSize: 30000,
|
||||
maxSize: 50000,
|
||||
cacheGroups: {
|
||||
default: false,
|
||||
vendor: {
|
||||
chunks: "initial",
|
||||
test: "node_modules",
|
||||
name: "vendor",
|
||||
minSize: 30000,
|
||||
maxSize: 50000,
|
||||
enforce: true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user