I want to achieve the following:
- have an index.html app on our server (I can create a electron specific index-electron.html if needed)
- use a package.json and main.js to create a mac and windows app
- My main.js on app.ready loads mainWindow.loadURL(< URL to index.html>)
- need to listen to events from my index.html on main.js, so I can update the AppIcon / badge.
I am able to do the following:
- get IPC to work when both main.js and index.html are locally available
- get IPC to work if I have a remote wrapper index-wrapper.html, that loads the real index.html as an iframe. I keep node-integration as true
when I try to have the main index.html, which has its own jQuery etc, I get one of two problems:
A. if node-integration=false, I get error when initializing ipc: require is not defined
B. if node-integration=true, ReferenceError: jQuery is not defined, within my own app
Any suggestions or pointers to a samples with my setup will be greatly appreciated.