From 1fb9a9c79747340dd743f96b301d8ee7f3b98b1e Mon Sep 17 00:00:00 2001 From: Ekaradon Date: Tue, 18 Oct 2016 16:33:45 +0200 Subject: [PATCH 1/2] fix poor performance with firefox when using `eval` as `devtool` see: https://github.com/facebookincubator/create-react-app/issues/920 --- packages/react-scripts/config/webpack.config.dev.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/react-scripts/config/webpack.config.dev.js b/packages/react-scripts/config/webpack.config.dev.js index 8a8b59ed85..d087f12903 100644 --- a/packages/react-scripts/config/webpack.config.dev.js +++ b/packages/react-scripts/config/webpack.config.dev.js @@ -34,11 +34,9 @@ var env = getClientEnvironment(publicUrl); // It is focused on developer experience and fast rebuilds. // The production configuration is different and lives in a separate file. module.exports = { - // This makes the bundle appear split into separate modules in the devtools. - // We don't use source maps here because they can be confusing: + // You may want 'eval' instead if you prefer to have the bundle appear split into separate modules in the devtools. // https://github.com/facebookincubator/create-react-app/issues/343#issuecomment-237241875 - // You may want 'cheap-module-source-map' instead if you prefer source maps. - devtool: 'eval', + devtool: 'cheap-module-source-map', // These are the "entry points" to our application. // This means they will be the "root" imports that are included in JS bundle. // The first two entry points enable "hot" CSS and auto-refreshes for JS. From f74e33fae069e5cbae6cbfa96f2459bebaf43a81 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sun, 20 Nov 2016 17:24:27 +0000 Subject: [PATCH 2/2] Update webpack.config.dev.js --- packages/react-scripts/config/webpack.config.dev.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react-scripts/config/webpack.config.dev.js b/packages/react-scripts/config/webpack.config.dev.js index d087f12903..4656baef22 100644 --- a/packages/react-scripts/config/webpack.config.dev.js +++ b/packages/react-scripts/config/webpack.config.dev.js @@ -34,8 +34,8 @@ var env = getClientEnvironment(publicUrl); // It is focused on developer experience and fast rebuilds. // The production configuration is different and lives in a separate file. module.exports = { - // You may want 'eval' instead if you prefer to have the bundle appear split into separate modules in the devtools. - // https://github.com/facebookincubator/create-react-app/issues/343#issuecomment-237241875 + // You may want 'eval' instead if you prefer to see the compiled output in DevTools. + // See the discussion in https://github.com/facebookincubator/create-react-app/issues/343. devtool: 'cheap-module-source-map', // These are the "entry points" to our application. // This means they will be the "root" imports that are included in JS bundle.