Skip to content

Commit

Permalink
Increment importLoaders for rulesets where there's a preprocessor (fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
joshhunt committed Dec 5, 2019
1 parent 2ace7c2 commit 891eb94
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/react-scripts/config/webpack.config.js
Expand Up @@ -141,6 +141,8 @@ module.exports = function(webpackEnv) {
sourceMap: true,
},
}
// ** STOP ** Are you adding a new loader after css-loader?
// Make sure to increment importLoaders appropriately where getStyleLoaders is called.
);
}
return loaders;
Expand Down Expand Up @@ -528,7 +530,7 @@ module.exports = function(webpackEnv) {
exclude: sassModuleRegex,
use: getStyleLoaders(
{
importLoaders: 2,
importLoaders: 3,
sourceMap: isEnvProduction && shouldUseSourceMap,
},
'sass-loader'
Expand All @@ -545,7 +547,7 @@ module.exports = function(webpackEnv) {
test: sassModuleRegex,
use: getStyleLoaders(
{
importLoaders: 2,
importLoaders: 3,
sourceMap: isEnvProduction && shouldUseSourceMap,
modules: {
getLocalIdent: getCSSModuleLocalIdent,
Expand Down

0 comments on commit 891eb94

Please sign in to comment.