We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e7d6cd commit 39f2182Copy full SHA for 39f2182
packages/react-error-overlay/webpack.config.iframe.js
@@ -26,10 +26,15 @@ module.exports = {
26
},
27
plugins: [
28
new webpack.DefinePlugin({
29
+ // We set process.env.NODE_ENV to 'production' so that React is build
30
+ // in production mode.
31
'process.env': { NODE_ENV: '"production"' },
32
+ // This prevents our bundled React from accidentally hijacking devtools.
33
__REACT_DEVTOOLS_GLOBAL_HOOK__:
34
'__REACT_ERROR_OVERLAY_GLOBAL_HOOK_NOOP__',
35
}),
36
+ // This code is embedded as a string, so it would never be optimized
37
+ // elsewhere.
38
new webpack.optimize.UglifyJsPlugin({
39
compress: {
40
warnings: false,
0 commit comments