From 81dd7d6dea0df3ca3ab0b63b1cf2e8165b940f7c Mon Sep 17 00:00:00 2001 From: Anthony Gubler Date: Fri, 2 Nov 2018 17:14:13 +0000 Subject: [PATCH 1/2] Ensure to exclude only files from the external dojo/widgets dep --- src/base.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/base.config.ts b/src/base.config.ts index 1f357e4d..27edefbf 100644 --- a/src/base.config.ts +++ b/src/base.config.ts @@ -443,7 +443,7 @@ export default function webpackConfigFactory(args: any): WebpackConfiguration { if (path.indexOf(srcPath) > -1 || path.indexOf(testPath) > -1) { return true; } - return /\.m\.css$/.test(path) && !/.*\@dojo\/widgets\/.*/.test(path); + return /\.m\.css$/.test(path) && !/.*\/node_modules\/@dojo\/widgets\/.*/.test(path); }, use: ExtractTextPlugin.extract({ fallback: ['style-loader'], @@ -463,7 +463,7 @@ export default function webpackConfigFactory(args: any): WebpackConfiguration { oneOf: [{ issuer: indexHtmlPattern, use: 'identity-loader' }, { use: cssLoader }] }, { - exclude: /.*\@dojo\/widgets\/.*/, + exclude: /.*\/node_modules\/@dojo\/widgets\/.*/, test: /\.m\.css$/, use: postCssModuleLoader } From 6fbef35c7d3e43323408852ab5c43597dcc0606f Mon Sep 17 00:00:00 2001 From: Anthony Gubler Date: Mon, 12 Nov 2018 14:41:07 +0000 Subject: [PATCH 2/2] windows separators --- src/base.config.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/base.config.ts b/src/base.config.ts index 27edefbf..726bc010 100644 --- a/src/base.config.ts +++ b/src/base.config.ts @@ -443,7 +443,10 @@ export default function webpackConfigFactory(args: any): WebpackConfiguration { if (path.indexOf(srcPath) > -1 || path.indexOf(testPath) > -1) { return true; } - return /\.m\.css$/.test(path) && !/.*\/node_modules\/@dojo\/widgets\/.*/.test(path); + return ( + /\.m\.css$/.test(path) && + !/.*(\/|\\)node_modules(\/|\\)@dojo(\/|\\)widgets(\/|\\).*/.test(path) + ); }, use: ExtractTextPlugin.extract({ fallback: ['style-loader'], @@ -463,7 +466,7 @@ export default function webpackConfigFactory(args: any): WebpackConfiguration { oneOf: [{ issuer: indexHtmlPattern, use: 'identity-loader' }, { use: cssLoader }] }, { - exclude: /.*\/node_modules\/@dojo\/widgets\/.*/, + exclude: /.*(\/|\\)node_modules(\/|\\)@dojo(\/|\\)widgets(\/|\\).*/, test: /\.m\.css$/, use: postCssModuleLoader }