Skip to content

Commit

Permalink
Enable source maps for DevTools production builds (#19773)
Browse files Browse the repository at this point in the history
Co-authored-by: Brian Vaughn <bvaughn@fb.com>
  • Loading branch information
jpribyl and Brian Vaughn authored Sep 18, 2020
1 parent 26857ec commit b3b1bb9
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/react-devtools-core/webpack.backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-core/webpack.standalone.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
9 changes: 8 additions & 1 deletion packages/react-devtools-extensions/chrome/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
9 changes: 8 additions & 1 deletion packages/react-devtools-extensions/edge/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
9 changes: 8 additions & 1 deletion packages/react-devtools-extensions/firefox/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-extensions/webpack.backend.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-extensions/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-inline/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const DEVTOOLS_VERSION = getVersionString();

module.exports = {
mode: __DEV__ ? 'development' : 'production',
devtool: false,
devtool: __DEV__ ? 'eval-cheap-source-map' : 'source-map',
entry: {
backend: './src/backend.js',
frontend: './src/frontend.js',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react-devtools-shell/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit b3b1bb9

Please sign in to comment.