retrixe/decaffeinater

productionMode and devtools.

Closed this issue · 1 comments

When leaving electron-devtools-installer on, it will throw errors after production. Using try/except and set a productionMode variable to detect if the application is running in production can automatically start the installer as well as devtools which will ease development :)

Commit 5e5e999 fixes this.

How?

In src/main.js by trying to import electron-devtools-installer and setting productionMode to false, but if it is unable to import it, it will set productionMode to true. If productionMode is true, the devtools won't start and it won't load the devtool installer, if it's false, then it will load devtools as well as the icons.