-
Notifications
You must be signed in to change notification settings - Fork 1
/
electron.vite.config.ts
49 lines (48 loc) · 1.36 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { resolve } from 'node:path'
import { PrimeVueResolver } from '@primevue/auto-import-resolver'
import vue from '@vitejs/plugin-vue'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import UnoCSS from 'unocss/vite'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { VueRouterAutoImports } from 'unplugin-vue-router'
import VueRouter from 'unplugin-vue-router/vite'
import vueDevTools from 'vite-plugin-vue-devtools'
export default defineConfig(() => {
return {
main: {
plugins: [externalizeDepsPlugin()],
},
preload: {
plugins: [externalizeDepsPlugin()],
},
renderer: {
resolve: {
alias: {
'@renderer': resolve('src/renderer/src'),
},
},
plugins: [
vue(),
VueRouter({
routesFolder: [
{
src: 'src/renderer/src/pages',
},
],
dts: 'src/renderer/typed-router.d.ts',
}),
Components({
dts: 'components.d.ts',
resolvers: [PrimeVueResolver()],
}),
AutoImport({
imports: ['vue', '@vueuse/core', VueRouterAutoImports, 'pinia'],
dirs: ['src/renderer/src/composables/**', 'src/renderer/src/utils/**'],
}),
UnoCSS(),
vueDevTools(),
],
},
}
})