@@ -56,6 +56,11 @@ const cssModuleLoaderClient = {
5656 } ,
5757 } ,
5858 ] ,
59+ // Don't consider CSS imports dead code even if the
60+ // containing package claims to have no side effects.
61+ // Remove this when webpack adds a warning or an error for this.
62+ // See https://github.com/webpack/webpack/issues/6571
63+ sideEffects : true ,
5964} ;
6065
6166const cssLoaderClient = {
@@ -72,6 +77,11 @@ const cssLoaderClient = {
7277 } ,
7378 } ,
7479 ] ,
80+ // Don't consider CSS imports dead code even if the
81+ // containing package claims to have no side effects.
82+ // Remove this when webpack adds a warning or an error for this.
83+ // See https://github.com/webpack/webpack/issues/6571
84+ sideEffects : true ,
7585} ;
7686
7787const cssModuleLoaderServer = {
@@ -93,12 +103,22 @@ const cssModuleLoaderServer = {
93103 } ,
94104 } ,
95105 ] ,
106+ // Don't consider CSS imports dead code even if the
107+ // containing package claims to have no side effects.
108+ // Remove this when webpack adds a warning or an error for this.
109+ // See https://github.com/webpack/webpack/issues/6571
110+ sideEffects : true ,
96111} ;
97112
98113const cssLoaderServer = {
99114 test : cssRegex ,
100115 exclude : cssModuleRegex ,
101116 use : [ MiniCssExtractPlugin . loader , require . resolve ( 'css-loader' ) ] ,
117+ // Don't consider CSS imports dead code even if the
118+ // containing package claims to have no side effects.
119+ // Remove this when webpack adds a warning or an error for this.
120+ // See https://github.com/webpack/webpack/issues/6571
121+ sideEffects : true ,
102122} ;
103123
104124const urlLoaderClient = {
0 commit comments