-
Notifications
You must be signed in to change notification settings - Fork 16
/
vite.config.mts
59 lines (58 loc) · 1.48 KB
/
vite.config.mts
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
50
51
52
53
54
55
56
57
58
59
import path from 'node:path'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
import UnoCSS from 'unocss/vite'
import ElementPlus from 'unplugin-element-plus/vite'
import VueMacros from 'unplugin-vue-macros/vite'
import { defineConfig } from 'vite'
import ElectronRenderer from 'vite-plugin-electron-renderer'
import { VineVitePlugin } from 'vue-vine/vite'
export default defineConfig({
base: './',
resolve: {
alias: {
'~/': `${path.resolve(__dirname, 'src')}/`,
},
},
css: {
preprocessorOptions: {
scss: {
additionalData: `@use "~/styles/element/index.scss" as *;`,
api: 'modern-compiler',
silenceDeprecations: ['legacy-js-api'],
},
},
},
plugins: [
VueMacros({
plugins: {
vue: vue({
script: {
defineModel: true,
},
}),
vueJsx: vueJsx(),
},
}),
UnoCSS(),
VineVitePlugin(),
ElementPlus({
useSource: true,
}),
ElectronRenderer(),
],
server: {
port: 3000,
},
build: {
rollupOptions: {
input: {
index: path.resolve(__dirname, 'index.html'),
about: path.resolve(__dirname, 'electronWindows/about/index.html'),
logoff: path.resolve(__dirname, 'electronWindows/logoff/index.html'),
repass: path.resolve(__dirname, 'electronWindows/repass/index.html'),
register: path.resolve(__dirname, 'electronWindows/register/index.html'),
},
},
},
})