From 50b0a47b20ae4a5e07b3b9bc9f4b87cc3bb509d1 Mon Sep 17 00:00:00 2001 From: Shawn Erquhart Date: Fri, 19 Jan 2018 11:13:09 -0500 Subject: [PATCH] define webpack loader.exclude with array for extensibility --- packages/gatsby/src/utils/webpack.config.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/gatsby/src/utils/webpack.config.js b/packages/gatsby/src/utils/webpack.config.js index 788b40a22a58c..bbbe3c862fc04 100644 --- a/packages/gatsby/src/utils/webpack.config.js +++ b/packages/gatsby/src/utils/webpack.config.js @@ -372,7 +372,7 @@ module.exports = async ( // Common config for every env. config.loader(`js`, { test: /\.jsx?$/, // Accept either .js or .jsx files. - exclude: /(node_modules|bower_components)/, + exclude: [/(node_modules|bower_components)/], loader: `babel`, query: babelConfig, }) @@ -409,7 +409,7 @@ module.exports = async ( case `develop`: config.loader(`css`, { test: /\.css$/, - exclude: /\.module\.css$/, + exclude: [/\.module\.css$/], loaders: [`style`, `css`, `postcss`], }) @@ -434,7 +434,7 @@ module.exports = async ( case `build-css`: config.loader(`css`, { test: /\.css$/, - exclude: /\.module\.css$/, + exclude: [/\.module\.css$/], loader: ExtractTextPlugin.extract([`css?minimize`, `postcss`]), }) @@ -464,7 +464,7 @@ module.exports = async ( config.loader(`css`, { test: /\.css$/, - exclude: /\.module\.css$/, + exclude: [/\.module\.css$/], loader: `null`, }) @@ -489,7 +489,7 @@ module.exports = async ( config.loader(`css`, { test: /\.css$/, - exclude: /\.module\.css$/, + exclude: [/\.module\.css$/], // loader: `null`, loader: ExtractTextPlugin.extract([`css`]), })