30 lines
602 B
TypeScript
30 lines
602 B
TypeScript
|
|
import { resolve } from 'node:path'
|
||
|
|
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
||
|
|
import react from '@vitejs/plugin-react'
|
||
|
|
|
||
|
|
export default defineConfig({
|
||
|
|
main: {
|
||
|
|
plugins: [externalizeDepsPlugin()],
|
||
|
|
build: {
|
||
|
|
rollupOptions: {
|
||
|
|
input: {
|
||
|
|
index: resolve(__dirname, 'electron/main.ts')
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
preload: {
|
||
|
|
plugins: [externalizeDepsPlugin()],
|
||
|
|
build: {
|
||
|
|
rollupOptions: {
|
||
|
|
input: {
|
||
|
|
index: resolve(__dirname, 'electron/preload.ts')
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
},
|
||
|
|
renderer: {
|
||
|
|
plugins: [react()]
|
||
|
|
}
|
||
|
|
})
|