From 25c1531d1cf4b4e6ebc0d708b65529b7be89d0a9 Mon Sep 17 00:00:00 2001 From: loveky Date: Sat, 17 Nov 2018 23:08:51 +0800 Subject: [PATCH] Update definition for webpack-chain to match version 5.0 --- types/webpack-chain/index.d.ts | 4 ++-- types/webpack-chain/webpack-chain-tests.ts | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/types/webpack-chain/index.d.ts b/types/webpack-chain/index.d.ts index 033ef9951f..d821d13417 100644 --- a/types/webpack-chain/index.d.ts +++ b/types/webpack-chain/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for webpack-chain 4.8 +// Type definitions for webpack-chain 5.0 // Project: https://github.com/mozilla-neutrino/webpack-chain // Definitions by: Eirikur Nilsson , Paul Sachs // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped @@ -209,7 +209,7 @@ declare namespace Config { flagIncludedChunks(value: boolean): this; mergeDuplicateChunks(value: boolean): this; minimize(value: boolean): this; - minimizer(value: webpack.Plugin[]): this; + minimizer(name: string): Plugin; namedChunks(value: boolean): this; namedModules(value: boolean): this; nodeEnv(value: boolean | string): this; diff --git a/types/webpack-chain/webpack-chain-tests.ts b/types/webpack-chain/webpack-chain-tests.ts index f1d0daa5e2..b655df07ea 100644 --- a/types/webpack-chain/webpack-chain-tests.ts +++ b/types/webpack-chain/webpack-chain-tests.ts @@ -173,7 +173,9 @@ config .flagIncludedChunks(true) .mergeDuplicateChunks(true) .minimize(true) - .minimizer([]) + .minimizer('foo') + .use(webpack.DefinePlugin) + .end() .namedChunks(true) .namedModules(true) .nodeEnv(true)