From 74d32027143287dd5901a0c3af91a6b665f6fc62 Mon Sep 17 00:00:00 2001 From: Ade Viankakrisna Fadlil Date: Wed, 10 Jan 2018 05:27:00 +0700 Subject: [PATCH] update comment about json-loader to explain why it is needed --- packages/react-scripts/config/webpack.config.dev.js | 4 ++-- packages/react-scripts/config/webpack.config.prod.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react-scripts/config/webpack.config.dev.js b/packages/react-scripts/config/webpack.config.dev.js index c6867427965..d0595c9a814 100644 --- a/packages/react-scripts/config/webpack.config.dev.js +++ b/packages/react-scripts/config/webpack.config.dev.js @@ -148,8 +148,8 @@ module.exports = { // match the requirements. When no loader matches it will fall // back to the "file" loader at the end of the loader list. oneOf: [ - // This is included by default, but when we add .json to eslint-loader - // test regex the compiler fails to recognize json files. + // Necessary because we add .json test in eslint-loader + // https://webpack.js.org/guides/migrating/#json-loader-is-not-required-anymore { test: /\.json$/, loader: require.resolve('json-loader'), diff --git a/packages/react-scripts/config/webpack.config.prod.js b/packages/react-scripts/config/webpack.config.prod.js index e8250cf7268..13c7cc9fae3 100644 --- a/packages/react-scripts/config/webpack.config.prod.js +++ b/packages/react-scripts/config/webpack.config.prod.js @@ -157,8 +157,8 @@ module.exports = { // match the requirements. When no loader matches it will fall // back to the "file" loader at the end of the loader list. oneOf: [ - // This is included by default, but when we add .json to eslint-loader - // test regex the compiler fails to recognize json files. + // Necessary because we add .json test in eslint-loader + // https://webpack.js.org/guides/migrating/#json-loader-is-not-required-anymore { test: /\.json$/, loader: require.resolve('json-loader'),