How to use the electron-devtools-installer.REACT_DEVELOPER_TOOLS.id function in electron-devtools-installer

To help you get started, we’ve selected a few electron-devtools-installer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github facebook / flipper / static / index.js View on Github external
delegateToLauncher(argv).then(hasLauncherInvoked => {
    if (hasLauncherInvoked) {
      app.quit();
      return;
    }
    appReady = true;
    app.commandLine.appendSwitch('scroll-bounce');
    tryCreateWindow();
    // if in development install the react devtools extension
    if (process.env.NODE_ENV === 'development') {
      const {
        default: installExtension,
        REACT_DEVELOPER_TOOLS,
        REDUX_DEVTOOLS,
      } = require('electron-devtools-installer');
      installExtension(REACT_DEVELOPER_TOOLS.id);
      installExtension(REDUX_DEVTOOLS.id);
    }
  });
});
github machawk1 / wail / wail-core / managers / windowManager.js View on Github external
const {default: installExtension, REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS} = require('electron-devtools-installer')
    try {
      await installExtension(REACT_DEVELOPER_TOOLS)
    } catch (error) {
      console.error(error)
    }
    try {
      await installExtension(REDUX_DEVTOOLS)
    } catch (error) {
      console.error(error)
    }
  } else {
    const path = require('path')
    const udata = app.getPath('userData')
    const {REACT_DEVELOPER_TOOLS, REDUX_DEVTOOLS} = require('electron-devtools-installer')
    BrowserWindow.addDevToolsExtension(path.join(udata, 'extensions', REACT_DEVELOPER_TOOLS.id))
    BrowserWindow.addDevToolsExtension(path.join(udata, 'extensions', REDUX_DEVTOOLS.id))
  }
}