From b2d16a83b3a76d63e80548b437eaa707ae144302 Mon Sep 17 00:00:00 2001 From: Jiaren Liu Date: Sun, 25 Mar 2018 11:04:38 +0800 Subject: [PATCH] add resourceQuery for webpack loader --- types/webpack/index.d.ts | 2 ++ types/webpack/webpack-tests.ts | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/types/webpack/index.d.ts b/types/webpack/index.d.ts index c6f4ae6c12..8c93019f24 100644 --- a/types/webpack/index.d.ts +++ b/types/webpack/index.d.ts @@ -421,6 +421,8 @@ declare namespace webpack { include?: Condition | Condition[]; /** A Condition matched with the resource. */ resource?: Condition | Condition[]; + /** A Condition matched with the resource query. */ + resourceQuery?: Condition | Condition[]; /** A condition matched with the issuer */ issuer?: Condition | Condition[]; /** diff --git a/types/webpack/webpack-tests.ts b/types/webpack/webpack-tests.ts index 971df8cd78..4ce24fb25d 100644 --- a/types/webpack/webpack-tests.ts +++ b/types/webpack/webpack-tests.ts @@ -145,6 +145,15 @@ rule = { loader: "babel-loader" }; +rule = { + test: /\.css$/, + resourceQuery: /module/, + loader: 'css-loader', + options: { + modules: true + } +}; + declare const require: any; declare const path: any; configuration = {