Skip to content

Commit ea4002e

Browse files
authored
Fix ICSS syntax in stylesheets (#10511)
1 parent 4d3bbe0 commit ea4002e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

+8
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,9 @@ module.exports = function (webpackEnv) {
518518
sourceMap: isEnvProduction
519519
? shouldUseSourceMap
520520
: isEnvDevelopment,
521+
modules: {
522+
compileType: 'icss',
523+
},
521524
}),
522525
// Don't consider CSS imports dead code even if the
523526
// containing package claims to have no side effects.
@@ -535,6 +538,7 @@ module.exports = function (webpackEnv) {
535538
? shouldUseSourceMap
536539
: isEnvDevelopment,
537540
modules: {
541+
compileType: 'module',
538542
getLocalIdent: getCSSModuleLocalIdent,
539543
},
540544
}),
@@ -551,6 +555,9 @@ module.exports = function (webpackEnv) {
551555
sourceMap: isEnvProduction
552556
? shouldUseSourceMap
553557
: isEnvDevelopment,
558+
modules: {
559+
compileType: 'icss',
560+
},
554561
},
555562
'sass-loader'
556563
),
@@ -571,6 +578,7 @@ module.exports = function (webpackEnv) {
571578
? shouldUseSourceMap
572579
: isEnvDevelopment,
573580
modules: {
581+
compileType: 'module',
574582
getLocalIdent: getCSSModuleLocalIdent,
575583
},
576584
},

0 commit comments

Comments
 (0)