From 235cce446466c5e29422645d5ea464efc9250ad0 Mon Sep 17 00:00:00 2001 From: jpribyl Date: Fri, 4 Sep 2020 10:49:47 -0600 Subject: [PATCH 1/4] Enable source maps for DevTools production builds --- packages/react-devtools-core/webpack.backend.js | 2 +- packages/react-devtools-core/webpack.standalone.js | 2 +- packages/react-devtools-extensions/chrome/manifest.json | 9 ++++++++- packages/react-devtools-extensions/edge/manifest.json | 9 ++++++++- packages/react-devtools-extensions/firefox/manifest.json | 9 ++++++++- packages/react-devtools-extensions/webpack.backend.js | 2 +- packages/react-devtools-extensions/webpack.config.js | 2 +- packages/react-devtools-inline/webpack.config.js | 2 +- packages/react-devtools-shell/webpack.config.js | 2 +- 9 files changed, 30 insertions(+), 9 deletions(-) diff --git a/packages/react-devtools-core/webpack.backend.js b/packages/react-devtools-core/webpack.backend.js index 1461545d29d57..336ae310affde 100644 --- a/packages/react-devtools-core/webpack.backend.js +++ b/packages/react-devtools-core/webpack.backend.js @@ -19,7 +19,7 @@ const DEVTOOLS_VERSION = getVersionString(); module.exports = { mode: __DEV__ ? 'development' : 'production', - devtool: __DEV__ ? 'cheap-module-eval-source-map' : false, + devtool: __DEV__ ? 'cheap-module-eval-source-map' : 'source-map', entry: { backend: './src/backend.js', }, diff --git a/packages/react-devtools-core/webpack.standalone.js b/packages/react-devtools-core/webpack.standalone.js index 61c1d962372b5..4d00d0f2d3a67 100644 --- a/packages/react-devtools-core/webpack.standalone.js +++ b/packages/react-devtools-core/webpack.standalone.js @@ -19,7 +19,7 @@ const DEVTOOLS_VERSION = getVersionString(); module.exports = { mode: __DEV__ ? 'development' : 'production', - devtool: __DEV__ ? 'cheap-module-eval-source-map' : false, + devtool: __DEV__ ? 'cheap-module-eval-source-map' : 'source-map', target: 'electron-main', entry: { standalone: './src/standalone.js', diff --git a/packages/react-devtools-extensions/chrome/manifest.json b/packages/react-devtools-extensions/chrome/manifest.json index f8abb8f49ec28..60fd566a5ebd5 100644 --- a/packages/react-devtools-extensions/chrome/manifest.json +++ b/packages/react-devtools-extensions/chrome/manifest.json @@ -32,7 +32,14 @@ "main.html", "panel.html", "build/react_devtools_backend.js", - "build/renderer.js" + "build/renderer.js", + "build/background.js.map", + "build/contentScript.js.map", + "build/injectGlobalHook.js.map", + "build/main.js.map", + "build/panel.js.map", + "build/renderer.js.map", + "build/react_devtools_backend.js.map" ], "background": { diff --git a/packages/react-devtools-extensions/edge/manifest.json b/packages/react-devtools-extensions/edge/manifest.json index 9e3b46f73a873..3fbb2900bd642 100644 --- a/packages/react-devtools-extensions/edge/manifest.json +++ b/packages/react-devtools-extensions/edge/manifest.json @@ -32,7 +32,14 @@ "main.html", "panel.html", "build/react_devtools_backend.js", - "build/renderer.js" + "build/renderer.js", + "build/background.js.map", + "build/contentScript.js.map", + "build/injectGlobalHook.js.map", + "build/main.js.map", + "build/panel.js.map", + "build/renderer.js.map", + "build/react_devtools_backend.js.map" ], "background": { diff --git a/packages/react-devtools-extensions/firefox/manifest.json b/packages/react-devtools-extensions/firefox/manifest.json index d380a6dbdad2f..ebe8547f10f5b 100644 --- a/packages/react-devtools-extensions/firefox/manifest.json +++ b/packages/react-devtools-extensions/firefox/manifest.json @@ -37,7 +37,14 @@ "main.html", "panel.html", "build/react_devtools_backend.js", - "build/renderer.js" + "build/renderer.js", + "build/background.js.map", + "build/contentScript.js.map", + "build/injectGlobalHook.js.map", + "build/main.js.map", + "build/panel.js.map", + "build/renderer.js.map", + "build/react_devtools_backend.js.map" ], "background": { diff --git a/packages/react-devtools-extensions/webpack.backend.js b/packages/react-devtools-extensions/webpack.backend.js index 2399c10892e35..c9f1c336b0268 100644 --- a/packages/react-devtools-extensions/webpack.backend.js +++ b/packages/react-devtools-extensions/webpack.backend.js @@ -18,7 +18,7 @@ const DEVTOOLS_VERSION = getVersionString(); module.exports = { mode: __DEV__ ? 'development' : 'production', - devtool: __DEV__ ? 'cheap-module-eval-source-map' : false, + devtool: __DEV__ ? 'cheap-module-eval-source-map' : 'source-map', entry: { backend: './src/backend.js', }, diff --git a/packages/react-devtools-extensions/webpack.config.js b/packages/react-devtools-extensions/webpack.config.js index 162d418d83c32..e2720ec240a99 100644 --- a/packages/react-devtools-extensions/webpack.config.js +++ b/packages/react-devtools-extensions/webpack.config.js @@ -18,7 +18,7 @@ const DEVTOOLS_VERSION = getVersionString(); module.exports = { mode: __DEV__ ? 'development' : 'production', - devtool: __DEV__ ? 'cheap-module-eval-source-map' : false, + devtool: __DEV__ ? 'cheap-module-eval-source-map' : 'source-map', entry: { background: './src/background.js', contentScript: './src/contentScript.js', diff --git a/packages/react-devtools-inline/webpack.config.js b/packages/react-devtools-inline/webpack.config.js index d841f48199e7a..bce59cd8afdce 100644 --- a/packages/react-devtools-inline/webpack.config.js +++ b/packages/react-devtools-inline/webpack.config.js @@ -17,7 +17,7 @@ const DEVTOOLS_VERSION = getVersionString(); module.exports = { mode: __DEV__ ? 'development' : 'production', - devtool: false, + devtool: __DEV__ ? 'cheap-module-eval-source-map' : 'source-map', entry: { backend: './src/backend.js', frontend: './src/frontend.js', diff --git a/packages/react-devtools-shell/webpack.config.js b/packages/react-devtools-shell/webpack.config.js index b1c737f6fa569..500fed2fb12ee 100644 --- a/packages/react-devtools-shell/webpack.config.js +++ b/packages/react-devtools-shell/webpack.config.js @@ -25,7 +25,7 @@ const DEVTOOLS_VERSION = getVersionString(); const config = { mode: __DEV__ ? 'development' : 'production', - devtool: false, + devtool: __DEV__ ? 'cheap-module-eval-source-map' : 'source-map', entry: { app: './src/app/index.js', devtools: './src/devtools.js', From c3518184e8a65a6f09f22376312166db4a7f1a4c Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Mon, 14 Sep 2020 10:05:27 -0400 Subject: [PATCH 2/4] Added source-maps to scheduling profiler production builds as well --- packages/react-devtools-scheduling-profiler/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-devtools-scheduling-profiler/webpack.config.js b/packages/react-devtools-scheduling-profiler/webpack.config.js index 6f7028eea26c3..b69a5d1b411ee 100644 --- a/packages/react-devtools-scheduling-profiler/webpack.config.js +++ b/packages/react-devtools-scheduling-profiler/webpack.config.js @@ -40,7 +40,7 @@ const babelOptions = { const config = { mode: __DEV__ ? 'development' : 'production', - devtool: __DEV__ ? 'cheap-module-eval-source-map' : false, + devtool: __DEV__ ? 'cheap-module-eval-source-map' : 'source-map', entry: { app: './src/index.js', }, From 9521b5725a29557c3e4e809ced00117227515d47 Mon Sep 17 00:00:00 2001 From: jpribyl Date: Mon, 14 Sep 2020 10:03:38 -0600 Subject: [PATCH 3/4] Use source-map in devtools-inline --- packages/react-devtools-inline/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-devtools-inline/webpack.config.js b/packages/react-devtools-inline/webpack.config.js index bce59cd8afdce..6a05842bbd73c 100644 --- a/packages/react-devtools-inline/webpack.config.js +++ b/packages/react-devtools-inline/webpack.config.js @@ -17,7 +17,7 @@ const DEVTOOLS_VERSION = getVersionString(); module.exports = { mode: __DEV__ ? 'development' : 'production', - devtool: __DEV__ ? 'cheap-module-eval-source-map' : 'source-map', + devtool: 'source-map', entry: { backend: './src/backend.js', frontend: './src/frontend.js', From 76d79f2bff2ec34dcfc067877f9822d1bd10be07 Mon Sep 17 00:00:00 2001 From: jpribyl Date: Thu, 17 Sep 2020 12:34:59 -0600 Subject: [PATCH 4/4] Use eval-cheap-source-map in dev builds of react-devtools-inline --- packages/react-devtools-inline/webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-devtools-inline/webpack.config.js b/packages/react-devtools-inline/webpack.config.js index 6a05842bbd73c..85c7da82ea3ea 100644 --- a/packages/react-devtools-inline/webpack.config.js +++ b/packages/react-devtools-inline/webpack.config.js @@ -17,7 +17,7 @@ const DEVTOOLS_VERSION = getVersionString(); module.exports = { mode: __DEV__ ? 'development' : 'production', - devtool: 'source-map', + devtool: __DEV__ ? 'eval-cheap-source-map' : 'source-map', entry: { backend: './src/backend.js', frontend: './src/frontend.js',