-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathelectron.vite.config.ts
28 lines (27 loc) · 1.02 KB
/
electron.vite.config.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { join } from 'path'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import react from '@vitejs/plugin-react'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import vue from '@vitejs/plugin-vue'
import tsconfigPaths from 'vite-tsconfig-paths'
export default defineConfig({
main: { plugins: [tsconfigPaths(), externalizeDepsPlugin({ exclude: ['reduxtron'] })] },
preload: { plugins: [tsconfigPaths(), externalizeDepsPlugin({ exclude: ['reduxtron'] })] },
renderer: {
plugins: [tsconfigPaths(), react(), svelte(), vue()],
publicDir: '../../resources',
define: {
__PLATFORM__: JSON.stringify(process.platform),
},
build: {
rollupOptions: {
input: {
index: join(__dirname, 'src', 'renderer', 'index.html'),
'add-to-do/vanilla': join(__dirname, 'src', 'renderer', 'add-to-do/vanilla.html'),
'add-to-do/svelte': join(__dirname, 'src', 'renderer', 'add-to-do/svelte.html'),
'add-to-do/vue': join(__dirname, 'src', 'renderer', 'add-to-do/vue.html'),
},
},
},
},
})