Skip to content

Commit

Permalink
Disable React DevTools in production
Browse files Browse the repository at this point in the history
  • Loading branch information
bobaekang committed Oct 14, 2021
1 parent b4c7877 commit b14c060
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ const plugins = [
process.env.REACT_APP_DISABLE_SOCKET || 'true'
),
},
// disable React DevTools in production; see https://github.com/facebook/react/pull/11448
...(process.env.NODE_ENV === 'production'
? { __REACT_DEVTOOLS_GLOBAL_HOOK__: '({ isDisabled: true })' }
: {}),
}),
new HtmlWebpackPlugin({
title: process.env.TITLE || 'PCDC Data Portal',
Expand Down

0 comments on commit b14c060

Please sign in to comment.