I’ve used Electron standalone before, and console.log()
commands in main.js
worked just fine (output to IDE console) and the electron-reload
module also worked fine when content changes were detected in the Electron root folder.
I’ve now started a new Ionic 5 project, and added Electron to the project via Capacitor. Capacitor makes a few necessary changes to Electron (e.g. renaming main.js to index.js etc), I’ve now also have to start electron via capacitor npx cap open electron
.
In doing so, console.log()
commands in index.js are now NOT being output to the IDE console, errors are not being output to console, and the electron-reload
module now serves a blank page when changes are detected… the only console output that I get is:
$ npx cap open electron
[info] Opening Electron project at ...
Is this a capacitor limitation or what configurations must be done to make this work ?
@ionic/cli@6.10.0
@capacitor/core@2.2.0
electron@8.3.1
also updated electron to latest 9.0.4 - same result.