Skip to content

Commit

Permalink
Fix ICSS syntax in stylesheets (facebook#10511)
Browse files Browse the repository at this point in the history
  • Loading branch information
thabemmz authored and sumanthratna committed Aug 4, 2021
1 parent 645a2c6 commit 2967678
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/react-scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,9 @@ module.exports = function (webpackEnv) {
sourceMap: isEnvProduction
? shouldUseSourceMap
: isEnvDevelopment,
modules: {
compileType: 'icss',
},
}),
// Don't consider CSS imports dead code even if the
// containing package claims to have no side effects.
Expand All @@ -546,6 +549,7 @@ module.exports = function (webpackEnv) {
? shouldUseSourceMap
: isEnvDevelopment,
modules: {
compileType: 'module',
getLocalIdent: getCSSModuleLocalIdent,
},
}),
Expand All @@ -562,6 +566,9 @@ module.exports = function (webpackEnv) {
sourceMap: isEnvProduction
? shouldUseSourceMap
: isEnvDevelopment,
modules: {
compileType: 'icss',
},
},
'sass-loader'
),
Expand All @@ -582,6 +589,7 @@ module.exports = function (webpackEnv) {
? shouldUseSourceMap
: isEnvDevelopment,
modules: {
compileType: 'module',
getLocalIdent: getCSSModuleLocalIdent,
},
},
Expand Down

0 comments on commit 2967678

Please sign in to comment.