mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02: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:
@@ -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$/,
|
||||
|
||||
Reference in New Issue
Block a user