Skip to content

Commit

Permalink
[DevTools] fix local build for extension (#26067)
Browse files Browse the repository at this point in the history
## Summary

resolves #26051

After we upgrade to Manifest V3, the browser no longer allow us to run
`eval` within the extension. It's not a problem for prod build, but for
dev build, webpack has been using eval to inject the source map for
devtool. This PR changes it to an alternative method.
  • Loading branch information
mondaychen committed Jan 27, 2023
1 parent cb16201 commit 78c4bec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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 @@ -36,7 +36,7 @@ const featureFlagTarget = process.env.FEATURE_FLAG_TARGET || 'extension-oss';

module.exports = {
mode: __DEV__ ? 'development' : 'production',
devtool: __DEV__ ? 'cheap-module-eval-source-map' : false,
devtool: __DEV__ ? 'cheap-module-source-map' : false,
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 @@ -48,7 +48,7 @@ const babelOptions = {

module.exports = {
mode: __DEV__ ? 'development' : 'production',
devtool: __DEV__ ? 'cheap-module-eval-source-map' : false,
devtool: __DEV__ ? 'cheap-module-source-map' : false,
entry: {
background: './src/background.js',
main: './src/main.js',
Expand Down

0 comments on commit 78c4bec

Please sign in to comment.