forked from vmos-dev/vmos-edge-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathelectron.vite.config.ts
More file actions
53 lines (51 loc) · 1.18 KB
/
Copy pathelectron.vite.config.ts
File metadata and controls
53 lines (51 loc) · 1.18 KB
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
import { resolve } from 'path'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import pkg from './package.json'
import vue from '@vitejs/plugin-vue'
import vueJsx from '@vitejs/plugin-vue-jsx'
// 镜像支持版本的时间
const imageSupportVersionTime = '20251227'
export default defineConfig({
main: {
plugins: [externalizeDepsPlugin()],
resolve: {
alias: {
'@shared': resolve('src/shared')
}
},
build: {
rollupOptions: {
input: {
index: resolve('src/main/index.ts'),
proxyCheckWorker: resolve('src/main/core/workers/proxyCheckWorker.ts')
}
}
}
},
preload: {
resolve: {
alias: {
'@shared': resolve('src/shared')
}
},
plugins: [externalizeDepsPlugin()]
},
renderer: {
base: './',
define: {
__APP_VERSION__: JSON.stringify(pkg.version),
__IMAGE_SUPPORT_VERSION_TIME__: imageSupportVersionTime
},
resolve: {
alias: {
'@renderer': resolve('src/renderer/src'),
'@shared': resolve('src/shared')
}
},
plugins: [vue(), vueJsx()],
server: {
host: true,
open: false
}
}
})