A template for building cross-platform desktop applications using SvelteKit and Electron, powered by Vite.
npm install
# or
yarn install
To start the app in development mode with hot reload:
npm run start
This will launch both the Electron main process and the SvelteKit renderer with live reload.
npm run make
This will create a distributable installer for your app. You can configure this in the makers section in forge.config.ts. Reference the makers documentation for more information.
This will build the app and you can find the output in the out directory. You can run the production app by opening the .app file in the out directory. This will not create your app's installer for distribution though.
npm run package
/ (root)
├── electron/ # Electron main & preload scripts
│ ├── main.ts
│ └── preload.ts
├── src/ # SvelteKit app source
│ ├── app.html
│ ├── app.css
│ └── lib/
│ └── routes/
├── static/ # Static assets
├── package.json # Project metadata & scripts
├── vite.config.ts # Vite config for renderer
├── vite.main.config.ts # Vite config for Electron main
├── vite.preload.config.ts # Vite config for preload
├── forge.config.ts # Electron Forge config
└── tsconfig.json # TypeScript config
src/ directory to add your SvelteKit pages and components.electron/main.ts and electron/preload.ts.This template is provided as-is, without warranty. Use it as a starting point for your own projects.