From 6f76253ef02b2f590492967c8548a0a86f369361 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Thu, 2 Apr 2020 19:10:16 +0100 Subject: [PATCH 1/2] Fix iconv loader --- packages/react-scripts/config/webpack.config.ssr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/config/webpack.config.ssr.js b/packages/react-scripts/config/webpack.config.ssr.js index c4b7529ac99..9359c4518e8 100644 --- a/packages/react-scripts/config/webpack.config.ssr.js +++ b/packages/react-scripts/config/webpack.config.ssr.js @@ -350,6 +350,7 @@ module.exports = function(webpackEnv) { ], }, module: { + noParse: /iconv-loader\.js$/, // https://github.com/webpack/webpack/issues/3078#issuecomment-400697407 strictExportPresence: true, rules: [ // Disable require.ensure as it's not a standard language feature. @@ -616,7 +617,6 @@ module.exports = function(webpackEnv) { ], }, plugins: [ - new webpack.IgnorePlugin(/\/iconv-loader$/), // https://github.com/webpack/webpack/issues/3078#issuecomment-400697407 useHardSourceWebpackPlugin && new HardSourceWebpackPlugin({ environmentHash }), useHardSourceWebpackPlugin && From 83e5434884e044520c7fe255b0e678d68ab9917f Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Fri, 3 Apr 2020 11:15:46 +0100 Subject: [PATCH 2/2] iconv fix needed for non-SSR too to prevent warning --- packages/react-scripts/config/webpack.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-scripts/config/webpack.config.js b/packages/react-scripts/config/webpack.config.js index e2efae4c233..68488337504 100644 --- a/packages/react-scripts/config/webpack.config.js +++ b/packages/react-scripts/config/webpack.config.js @@ -345,6 +345,7 @@ module.exports = function(webpackEnv) { ], }, module: { + noParse: /iconv-loader\.js$/, // https://github.com/webpack/webpack/issues/3078#issuecomment-400697407 strictExportPresence: true, rules: [ // Disable require.ensure as it's not a standard language feature.