Ensure you have Node.js 20 installed on your machine.
-
Clone this repository and install dependencies:
git clone https://github.com/AghastyGD/ionic-electron-starter-project.git cd ionic-electron-starter-project npm install
-
Run the vite dev server for the Ionic web app:
npm run dev # opens the vite dev server for the Ionic web app at http://localhost:5173/
-
Navigate to the electron folder:
- Check for the
node_modules
folder. - If it doesn't exist, run:
cd electron npm install
- Check for the
-
Build the ionic app for electron:
ionic build ionic cap open electron # opens the electron app with the ionic base template sidemenu
Note: If you encounter "command not found" errors for Ionic, install it globally using:
npm install -g @ionic/cli
For any issues or questions, please feel free to contact me.