I found out that this plugin offers me some usefull utilities but I do not want as a production depedency to my built application thus I installed it as:
npm install --save-dev electron-debug
If I place it like that to my code I assume that my production builds will not run because this depedency does not exist:
require('electron-debug')();
So how I can "optionally" load it and silently suppress any error and continue without any much trouble?
Also here is mentioned :
Only runs when in development, unless overridden by the enabled option.
But if I use --save
instead of --save-dev
I assume that the dependency will be installed on my production built app as well, a dependency that is only used for debugging, and that kinda sucks.