Disable Redux devTools
Summary: I can't recall seeing anybody use Redux DevTools in the last 2 years. I don't think it adds much (most data in it is not serializable anyway), and disabling hopefully makes memory leaks / OOMs less likely on long debug sessions :) If someone misses it, feel free to bring it back. Reviewed By: passy Differential Revision: D31827421 fbshipit-source-id: 3c3836d4620a1ae431116df2de19a606672a6cd7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
27549ac5eb
commit
cc946d12ec
@@ -192,21 +192,12 @@ app.on('ready', async () => {
|
|||||||
const {
|
const {
|
||||||
default: installExtension,
|
default: installExtension,
|
||||||
REACT_DEVELOPER_TOOLS,
|
REACT_DEVELOPER_TOOLS,
|
||||||
REDUX_DEVTOOLS,
|
|
||||||
} = require('electron-devtools-installer');
|
} = require('electron-devtools-installer');
|
||||||
// if set, try to download a newever version of the dev tools
|
// if set, try to download a newever version of the dev tools
|
||||||
const forceDownload = process.env.FLIPPER_UPDATE_DEV_TOOLS === 'true';
|
const forceDownload = process.env.FLIPPER_UPDATE_DEV_TOOLS === 'true';
|
||||||
if (forceDownload) {
|
if (forceDownload) {
|
||||||
console.log('Force updating DevTools');
|
console.log('Force updating DevTools');
|
||||||
}
|
}
|
||||||
// Redux
|
|
||||||
try {
|
|
||||||
await installExtension(REDUX_DEVTOOLS.id, {
|
|
||||||
loadExtensionOptions: {allowFileAccess: true, forceDownload},
|
|
||||||
});
|
|
||||||
} catch (e) {
|
|
||||||
console.error('Failed to install Redux devtools extension', e);
|
|
||||||
}
|
|
||||||
// React
|
// React
|
||||||
// Fix for extension loading (see D27685981)
|
// Fix for extension loading (see D27685981)
|
||||||
// Work around per https://github.com/electron/electron/issues/23662#issuecomment-787420799
|
// Work around per https://github.com/electron/electron/issues/23662#issuecomment-787420799
|
||||||
|
|||||||
Reference in New Issue
Block a user