Ionic3 & Electron: How to handle an universal application?


First, I have to point out I’m a beginner on Ionic framework.

And yes, I begin with a big project :slight_smile: I would like to make an universal application, compatible with Android, iOS and desktop.

So, I’m looking for the solution Ionic Framework + Electron. After some testing, and following this tutorial I’m able to launch an Electron application boarding Ionic.
But, it works only in Electron, not anymore in desktop browser or Android.

I think I’m not on the good way to make my universal application… In my test, I have modify the webpack config to load externals on build, like electron, fs… But I don’t want them for an Android build!

How can I handle these different build? I would like to use only Ionic for mobile device, and Ionic embedded in Electron for desktop.

Two ionic project, pointing on same src folder is possible? (one project with just ionic and another one with Electron)

What do you think of this approach? Or, if you already made a universal application, how did you make it?

Thanks in advance!

I can suggest you this thread.
They talk about some tutorials on this topic.

1 Like