From 0378d4e1ac014cde60e0ae1961ce081290c032b4 Mon Sep 17 00:00:00 2001 From: Gray Zhang Date: Wed, 3 Oct 2018 02:06:44 +0800 Subject: [PATCH] Allow false as cache group value (#29354) --- types/webpack/index.d.ts | 2 +- types/webpack/webpack-tests.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/types/webpack/index.d.ts b/types/webpack/index.d.ts index 5e5b04595f..cf13359e0e 100644 --- a/types/webpack/index.d.ts +++ b/types/webpack/index.d.ts @@ -601,7 +601,7 @@ declare namespace webpack { /** Give chunks created a name (chunks with equal name are merged) */ name?: boolean | string | ((...args: any[]) => any); /** Assign modules to a cache group (modules from different cache groups are tried to keep in separate chunks) */ - cacheGroups?: false | string | ((...args: any[]) => any) | RegExp | { [key: string]: CacheGroupsOptions }; + cacheGroups?: false | string | ((...args: any[]) => any) | RegExp | { [key: string]: CacheGroupsOptions | false }; } interface RuntimeChunkOptions { /** The name or name factory for the runtime chunks. */ diff --git a/types/webpack/webpack-tests.ts b/types/webpack/webpack-tests.ts index 16234d422a..ab0755d0e6 100644 --- a/types/webpack/webpack-tests.ts +++ b/types/webpack/webpack-tests.ts @@ -633,6 +633,7 @@ configuration = { optimization: { splitChunks: { cacheGroups: { + default: false, vendor: { chunks: "initial", test: "node_modules",