vite-plugin-electron
Integrate Vite and Electron
Example 👉 vite-plugin-electron-quick-start
Usage
vite.config.ts
import { defineConfig } from 'vite'
import electron from 'vite-plugin-electron'
import electronConfig from './vite-electron.config'
export default defineConfig({
plugins: [
electron(electronConfig),
],
})
vite-electron.config.ts
import { defineConfig } from 'vite-plugin-electron'
export default defineConfig({
main: {
entry: 'electron-main.ts',
},
})
If you only need to build the Renderer-process, you can just use the vite-plugin-electron-renderer
plugin
renderer/vite.config.ts
import electronRenderer from 'vite-plugin-electron/renderer'
export default {
plugins: [
electronRenderer(),
],
}