- I just played a little bit with the new Cordova/Electron integration.
Right now it seems these are handled as 2 independent projects (Cordova & Electron) inside another project (F7). So - there are 2 separate node_modules, package.json, etc…
Now, if I install a node_module that I need from Electron, Cordova and F7, where do I install them, so it gets packaged correctly?
I had the problem that - if I install a module inside Cordova (e.g. npm install ‘’ into Cordova, dependencies are not resolved in F7 and vice versa. So how would I handle that?
-
How would I handle the situation, where I need to require something in
platforms/electron/platform_www/cdv-electron-main.js
, so this survives updating the project/platform? -
If I want to communicate from the UI to the renderer-process, I need to
require("electron")
somewhere in the app (maybe app.js). But then again, how would I set this up, so I don’t need to add another electron-module to the frontend? -
And finally: How would I instruct Webpack to bundle things together so a compiled project is a) still working and b) doesn’t need everything (code) twice?
Sorry for the longer question, but I think getting sorted out these (basic) problems/questions would better help to understand how to create a great setup to work with.