Skip to content

Commit b14c060

Browse files
committed
Disable React DevTools in production
ref: facebook/react#11448
1 parent b4c7877 commit b14c060

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

webpack.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ const plugins = [
2929
process.env.REACT_APP_DISABLE_SOCKET || 'true'
3030
),
3131
},
32+
// disable React DevTools in production; see https://github.com/facebook/react/pull/11448
33+
...(process.env.NODE_ENV === 'production'
34+
? { __REACT_DEVTOOLS_GLOBAL_HOOK__: '({ isDisabled: true })' }
35+
: {}),
3236
}),
3337
new HtmlWebpackPlugin({
3438
title: process.env.TITLE || 'PCDC Data Portal',

0 commit comments

Comments
 (0)