Skip to content

Commit

Permalink
define webpack loader.exclude with array for extensibility
Browse files Browse the repository at this point in the history
  • Loading branch information
erquhart committed Jan 19, 2018
1 parent 53f66a4 commit 50b0a47
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/gatsby/src/utils/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
Expand Down Expand Up @@ -409,7 +409,7 @@ module.exports = async (
case `develop`:
config.loader(`css`, {
test: /\.css$/,
exclude: /\.module\.css$/,
exclude: [/\.module\.css$/],
loaders: [`style`, `css`, `postcss`],
})

Expand All @@ -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`]),
})

Expand Down Expand Up @@ -464,7 +464,7 @@ module.exports = async (

config.loader(`css`, {
test: /\.css$/,
exclude: /\.module\.css$/,
exclude: [/\.module\.css$/],
loader: `null`,
})

Expand All @@ -489,7 +489,7 @@ module.exports = async (

config.loader(`css`, {
test: /\.css$/,
exclude: /\.module\.css$/,
exclude: [/\.module\.css$/],
// loader: `null`,
loader: ExtractTextPlugin.extract([`css`]),
})
Expand Down

0 comments on commit 50b0a47

Please sign in to comment.