Created
March 19, 2017 00:36
-
-
Save guzmonne/2f1ceb3c1218c12fa2ac2ade0281770f to your computer and use it in GitHub Desktop.
Add React Developent Tools to Electron project on development mode.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // If working in development mode, install React DevTools | |
| if (process.env.NODE_ENV === 'development'){ | |
| const { | |
| default: installExtension, | |
| REACT_DEVELOPER_TOOLS | |
| } = require('electron-devtools-installer') | |
| // Install chrome extensions | |
| installExtension(REACT_DEVELOPER_TOOLS) | |
| .then((name) => console.log(`Added Extension: ${name}`)) | |
| .catch((err) => console.log('An error occurred: ', err)); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment