From 642948e9842bab5aa305c6db0980ed0b6f64f980 Mon Sep 17 00:00:00 2001 From: Paul Sachs Date: Thu, 10 Aug 2017 23:28:26 -0400 Subject: [PATCH 1/2] Update definitions to v4 Definition now matches supported noParse of webpack@3 --- types/webpack-chain/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/webpack-chain/index.d.ts b/types/webpack-chain/index.d.ts index fc9e2e158c..f3e761c36a 100644 --- a/types/webpack-chain/index.d.ts +++ b/types/webpack-chain/index.d.ts @@ -83,7 +83,7 @@ declare namespace Config { class Module extends ChainedMap { rules: TypedChainedMap; rule(name: string): Rule; - noParse: TypedChainedSet; + noParse(noParse: RegExp | RegExp[] | ((contentPath: string) => boolean )): this; } class Output extends ChainedMap { From 7e72aeec97e15a336bc8d3ea61b40a48dae3182d Mon Sep 17 00:00:00 2001 From: psachs Date: Thu, 10 Aug 2017 23:44:31 -0400 Subject: [PATCH 2/2] Tests to confirm v4 API --- types/webpack-chain/index.d.ts | 2 +- types/webpack-chain/webpack-chain-tests.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/types/webpack-chain/index.d.ts b/types/webpack-chain/index.d.ts index f3e761c36a..b062c42548 100644 --- a/types/webpack-chain/index.d.ts +++ b/types/webpack-chain/index.d.ts @@ -1,6 +1,6 @@ // Type definitions for webpack-chain 3.0 // Project: https://github.com/mozilla-neutrino/webpack-chain -// Definitions by: Eirikur Nilsson +// Definitions by: Eirikur Nilsson , Paul Sachs // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped import * as webpack from 'webpack'; diff --git a/types/webpack-chain/webpack-chain-tests.ts b/types/webpack-chain/webpack-chain-tests.ts index ac40e70624..1118fe0d26 100644 --- a/types/webpack-chain/webpack-chain-tests.ts +++ b/types/webpack-chain/webpack-chain-tests.ts @@ -83,7 +83,7 @@ config .end() .module - .noParse.add(/.min.js$/).end() + .noParse(/.min.js$/) .rule('compile') .test(/.js$/) .include