@samitouri / QOS-React-2 / commits / 78c4bec207

[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.

Mengdi Chen committed Jan 27, 2023 at 15:35 UTC 78c4bec207795e718b5f4acc48ade19c8b94bf1f
2 files changed +2 -2
packages/react-devtools-extensions/webpack.backend.js
+1 -1
@@ -36,7 +36,7 @@ const featureFlagTarget = process.env.FEATURE_FLAG_TARGET || 'extension-oss';
36
37 module.exports = {
38 mode: __DEV__ ? 'development' : 'production',
39 - devtool: __DEV__ ? 'cheap-module-eval-source-map' : false,
39 + devtool: __DEV__ ? 'cheap-module-source-map' : false,
40 entry: {
41 backend: './src/backend.js',
42 },
packages/react-devtools-extensions/webpack.config.js
+1 -1
@@ -48,7 +48,7 @@ const babelOptions = {
48
49 module.exports = {
50 mode: __DEV__ ? 'development' : 'production',
51 - devtool: __DEV__ ? 'cheap-module-eval-source-map' : false,
51 + devtool: __DEV__ ? 'cheap-module-source-map' : false,
52 entry: {
53 background: './src/background.js',
54 main: './src/main.js',