From 8bad6e7e7d1a635a04f790a7fd5fddff505a0065 Mon Sep 17 00:00:00 2001 From: Christiaan van Bemmel Date: Mon, 12 Apr 2021 04:27:31 +0200 Subject: [PATCH] Fix ICSS syntax in stylesheets (#10511) --- packages/react-scripts/config/webpack.config.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index 9530453a4cc..5e5f87f3ce9 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -518,6 +518,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. @@ -535,6 +538,7 @@ module.exports = function (webpackEnv) { ? shouldUseSourceMap : isEnvDevelopment, modules: { + compileType: 'module', getLocalIdent: getCSSModuleLocalIdent, }, }), @@ -551,6 +555,9 @@ module.exports = function (webpackEnv) { sourceMap: isEnvProduction ? shouldUseSourceMap : isEnvDevelopment, + modules: { + compileType: 'icss', + }, }, 'sass-loader' ), @@ -571,6 +578,7 @@ module.exports = function (webpackEnv) { ? shouldUseSourceMap : isEnvDevelopment, modules: { + compileType: 'module', getLocalIdent: getCSSModuleLocalIdent, }, },