Skip to content

Commit 78c4bec

Browse files
authored
[DevTools] fix local build for extension (#26067)
## 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.
1 parent cb16201 commit 78c4bec

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/react-devtools-extensions/webpack.backend.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const featureFlagTarget = process.env.FEATURE_FLAG_TARGET || 'extension-oss';
3636

3737
module.exports = {
3838
mode: __DEV__ ? 'development' : 'production',
39-
devtool: __DEV__ ? 'cheap-module-eval-source-map' : false,
39+
devtool: __DEV__ ? 'cheap-module-source-map' : false,
4040
entry: {
4141
backend: './src/backend.js',
4242
},

packages/react-devtools-extensions/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const babelOptions = {
4848

4949
module.exports = {
5050
mode: __DEV__ ? 'development' : 'production',
51-
devtool: __DEV__ ? 'cheap-module-eval-source-map' : false,
51+
devtool: __DEV__ ? 'cheap-module-source-map' : false,
5252
entry: {
5353
background: './src/background.js',
5454
main: './src/main.js',

0 commit comments

Comments
 (0)