Making it easier to build Electron apps with Vite:
a single config file vite.config.ts for both main and renderer process:
export default {
// ..config for building the renderer code
plugins: [
// automatically starts the main process
// after the vite server is started
electron({
main: './main/index.ts',
preload: './preload/index.ts'
})
]
}
Making it easier to build Electron apps with Vite:
vite.config.ts
for both main and renderer process: