mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #4172 from overleaf/ae-enable-react-dev-tools
Re-enable React Dev Tools GitOrigin-RevId: 2757888b03997b9df55f1ef1a8fa0cca71cbcc78
This commit is contained in:
parent
3d5687a1f4
commit
10e7a919c0
2 changed files with 9 additions and 5 deletions
|
@ -1,3 +1,4 @@
|
|||
const webpack = require('webpack')
|
||||
const merge = require('webpack-merge')
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
|
||||
|
||||
|
@ -15,6 +16,14 @@ module.exports = merge(base, {
|
|||
// Output to public/stylesheets directory
|
||||
filename: 'stylesheets/[name].css',
|
||||
}),
|
||||
|
||||
// Disable React DevTools if DISABLE_REACT_DEVTOOLS is set to "true"
|
||||
new webpack.DefinePlugin({
|
||||
__REACT_DEVTOOLS_GLOBAL_HOOK__:
|
||||
process.env.DISABLE_REACT_DEVTOOLS === 'true'
|
||||
? '({ isDisabled: true })'
|
||||
: undefined,
|
||||
}),
|
||||
],
|
||||
|
||||
devServer: {
|
||||
|
|
|
@ -256,11 +256,6 @@ module.exports = {
|
|||
writeToFileEmit: true,
|
||||
}),
|
||||
|
||||
// Silence react messages in the dev-tools console
|
||||
new webpack.DefinePlugin({
|
||||
__REACT_DEVTOOLS_GLOBAL_HOOK__: '({ isDisabled: true })',
|
||||
}),
|
||||
|
||||
// Prevent moment from loading (very large) locale files that aren't used
|
||||
new webpack.IgnorePlugin({
|
||||
resourceRegExp: /^\.\/locale$/,
|
||||
|
|
Loading…
Reference in a new issue