Skip to content

Commit 2967678

Browse files
thabemmzsumanthratna
authored andcommitted
Fix ICSS syntax in stylesheets (facebook#10511)
1 parent 645a2c6 commit 2967678

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
@@ -529,6 +529,9 @@ module.exports = function (webpackEnv) {
529529
sourceMap: isEnvProduction
530530
? shouldUseSourceMap
531531
: isEnvDevelopment,
532+
modules: {
533+
compileType: 'icss',
534+
},
532535
}),
533536
// Don't consider CSS imports dead code even if the
534537
// containing package claims to have no side effects.
@@ -546,6 +549,7 @@ module.exports = function (webpackEnv) {
546549
? shouldUseSourceMap
547550
: isEnvDevelopment,
548551
modules: {
552+
compileType: 'module',
549553
getLocalIdent: getCSSModuleLocalIdent,
550554
},
551555
}),
@@ -562,6 +566,9 @@ module.exports = function (webpackEnv) {
562566
sourceMap: isEnvProduction
563567
? shouldUseSourceMap
564568
: isEnvDevelopment,
569+
modules: {
570+
compileType: 'icss',
571+
},
565572
},
566573
'sass-loader'
567574
),
@@ -582,6 +589,7 @@ module.exports = function (webpackEnv) {
582589
? shouldUseSourceMap
583590
: isEnvDevelopment,
584591
modules: {
592+
compileType: 'module',
585593
getLocalIdent: getCSSModuleLocalIdent,
586594
},
587595
},

0 commit comments

Comments
 (0)