The best way to create desktop applications with Nuxt and Electron
- Develop your app in the browser with hot module replacement and Vue devtools
- Avoid tedious IPC communication between main and renderer processes
- Write minimal main process code and restart it less often
- Care about Electron only when you need to build and distribute your app
- ๐ Enjoy all the benefits of Nuxt, such as SSR, server API, code splitting and more
- ๐ฆ Start with a simple template that you can customize to your needs
Create a repo from this template on GitHub.
If you prefer to do it manually with the cleaner git history
npx degit ablipan/nuxtron my-nuxt-electron-app
cd my-nuxt-electron-app
pnpm install # You can use any package manager you like
When you use this template, try follow the checklist to update your info properly
- Change the author name in
LICENSE
- Change the name,author in
package.json
- Change the title in
nuxt.config.ts
- Change the title in
electron/main/createWindow.ts
- Change the appId,productName in
electron-builder.config.cjs
- Change the logo.svg in
public
- Clean up the READMEs
And, enjoy :)
Just run and visit http://localhost:3000
pnpm dev
To build the Nuxt, run
pnpm build
Then to build the Electron app, run
pnpm electron:build
Then package the app, run
pnpm electron:builder
Check the release
folder for the packaged app.