Skip to content

Commit 5ccced7

Browse files
committed
Fixing css-loader/locals error
1 parent a47edb5 commit 5ccced7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,11 @@ module.exports = function(webpackEnv) {
113113
// : {},
114114
// },
115115
{
116-
loader: require.resolve('css-loader/locals'),
117-
options: cssOptions,
116+
// Since v2.0.0 css-loader/locals was removed in favour of exportOnlyLocals option
117+
// So adding the option here in replacement as per
118+
// https://github.com/webpack-contrib/css-loader#exportonlylocals
119+
loader: require.resolve('css-loader'),
120+
options: {...cssOptions, exportOnlyLocals: true},
118121
},
119122
{
120123
// Options for PostCSS as we reference these options twice

0 commit comments

Comments
 (0)