Skip to content

Commit 891eb94

Browse files
committed
Increment importLoaders for rulesets where there's a preprocessor (fixes #7919)
1 parent 2ace7c2 commit 891eb94

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/react-scripts/config/webpack.config.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ module.exports = function(webpackEnv) {
141141
sourceMap: true,
142142
},
143143
}
144+
// ** STOP ** Are you adding a new loader after css-loader?
145+
// Make sure to increment importLoaders appropriately where getStyleLoaders is called.
144146
);
145147
}
146148
return loaders;
@@ -528,7 +530,7 @@ module.exports = function(webpackEnv) {
528530
exclude: sassModuleRegex,
529531
use: getStyleLoaders(
530532
{
531-
importLoaders: 2,
533+
importLoaders: 3,
532534
sourceMap: isEnvProduction && shouldUseSourceMap,
533535
},
534536
'sass-loader'
@@ -545,7 +547,7 @@ module.exports = function(webpackEnv) {
545547
test: sassModuleRegex,
546548
use: getStyleLoaders(
547549
{
548-
importLoaders: 2,
550+
importLoaders: 3,
549551
sourceMap: isEnvProduction && shouldUseSourceMap,
550552
modules: {
551553
getLocalIdent: getCSSModuleLocalIdent,

0 commit comments

Comments
 (0)