diff --git a/types/webpack/index.d.ts b/types/webpack/index.d.ts index cf13359e0e..28747291e4 100644 --- a/types/webpack/index.d.ts +++ b/types/webpack/index.d.ts @@ -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 */ diff --git a/types/webpack/webpack-tests.ts b/types/webpack/webpack-tests.ts index ab0755d0e6..626aba6ac9 100644 --- a/types/webpack/webpack-tests.ts +++ b/types/webpack/webpack-tests.ts @@ -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 } }