Can I bring my Electron App to IOS/Android using Capacitor

I’m investigating the best way to bring an Electron App to IOS/Android with as much shared codebase as possible. The Electron App is made with react on top and are using a extra worker window for background processing.
Looking around for blogs or documentation it seems that moving Ionic apps to the desktop with electron is fully supported. But the other way around I find it hard to find any good material on the matter.
I know I would have to replace main node process and maybe the worker window with some smartphone replacements. I can probably deal with that. But when I try to add Capacitor to my App project and add an IOS project and run it in X-code I get breaking javascript errors tha all of my app references to preload electron stuff like IPC is not found.

If anyone has experience or someone from the community knows about examples or documentation about this, then I would appreciate some links very much, thanks

Best regards from Peter, Denmark

Capacitor can only run web compliant code, not nodejs code.
If your electron app isolates the web code and the node code then it should just work, but if your nodejs is mixed with the web code then you’ll have to do adjustments to isolate the node code and only run the web code inside your Capacitor app.

Thanks for reply Julio. I know there’s many thing I’m not able to bring from the Electron app to a Cap. version, like Main (node.js), preload isolated (node.js/electron), IPC communications etc. But I thought I could make some workarounds replacing these with specific IOS/And. platform code.

But I need some guidance to where to spilt the code and how to still have a shared codebase. Also how to setup Webpack to make a specific Capacitor release. So if someone succeeded doing this I would appreciate some knowhow sharing a lot:-)