Skip to content

Commit af12611

Browse files
committed
Revert - Adding colors to noParse
1 parent 84adac3 commit af12611

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ module.exports = function(webpackEnv) {
383383
],
384384
},
385385
module: {
386-
noParse: [/iconv-loader\.js$/, /colors\.js$/], // https://github.com/webpack/webpack/issues/3078#issuecomment-400697407
386+
noParse: /iconv-loader\.js$/, // https://github.com/webpack/webpack/issues/3078#issuecomment-400697407
387387
strictExportPresence: true,
388388
rules: [
389389
// Disable require.ensure as it's not a standard language feature.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,11 @@ module.exports = function(webpackEnv) {
116116
// : {},
117117
// },
118118
{
119-
// Since v2.0.0 css-loader/locals was removed in favour of exportOnlyLocals option
119+
// In v3.0.0 css-loader/locals was removed in favour of onlyLocals option
120120
// So adding the option here in replacement as per
121-
// https://github.com/webpack-contrib/css-loader#exportonlylocals
121+
// https://github.com/webpack-contrib/css-loader/tree/v3.4.2#onlylocals
122122
loader: require.resolve('css-loader'),
123-
options: { ...cssOptions, exportOnlyLocals: true },
123+
options: { ...cssOptions, onlyLocals: true },
124124
},
125125
{
126126
// Options for PostCSS as we reference these options twice
@@ -362,7 +362,7 @@ module.exports = function(webpackEnv) {
362362
],
363363
},
364364
module: {
365-
noParse: [/iconv-loader\.js$/, /colors\.js$/], // https://github.com/webpack/webpack/issues/3078#issuecomment-400697407
365+
noParse: /iconv-loader\.js$/, // https://github.com/webpack/webpack/issues/3078#issuecomment-400697407
366366
strictExportPresence: true,
367367
rules: [
368368
// Disable require.ensure as it's not a standard language feature.

packages/react-scripts/scripts/start-ssr.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,16 @@ verifyTypeScriptSetup();
3232
// @remove-on-eject-end
3333

3434
const fs = require('fs');
35-
const { createCompiler } = require('react-dev-utils/WebpackDevServerUtils');
3635
const webpack = require('webpack');
37-
38-
const configFactory = require('../config/webpack.config.ssr');
36+
const { createCompiler } = require('react-dev-utils/WebpackDevServerUtils');
3937
const paths = require('../config/paths');
38+
const configFactory = require('../config/webpack.config.ssr');
4039

4140
const statusFile = require('./utils/statusFile');
4241

4342
const config = configFactory('development');
4443
const appName = require(paths.appPackageJson).name;
4544
const useYarn = fs.existsSync(paths.yarnLockFile);
46-
4745
const useTypeScript = fs.existsSync(paths.appTsConfig);
4846
const tscCompileOnError = process.env.TSC_COMPILE_ON_ERROR === 'true';
4947

0 commit comments

Comments
 (0)