-
Notifications
You must be signed in to change notification settings - Fork 0
/
electron.vite.config.ts
49 lines (48 loc) · 1.61 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 react from '@vitejs/plugin-react'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import path from 'path'
export default defineConfig({
main: {
plugins: [externalizeDepsPlugin()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src/main'),
'@ui': path.resolve(__dirname, './src/main/ui'),
'@ipc': path.resolve(__dirname, './src/main/ipc'),
'@utils': path.resolve(__dirname, './src/main/utils'),
'@database': path.resolve(__dirname, './src/main/database'),
'@models': path.resolve(__dirname, './src/main/models'),
'@services': path.resolve(__dirname, './src/main/services'),
'@repositories': path.resolve(__dirname, './src/main/repositories'),
'@main/shared': path.resolve(__dirname, './src/main/shared'),
'@shared': path.resolve(__dirname, './src/shared')
}
},
build: {
minify: 'esbuild'
}
},
preload: {
plugins: [externalizeDepsPlugin()]
},
renderer: {
base: './',
plugins: [react()],
define: {
'process.env': process.env
},
build: {
minify: 'esbuild'
},
resolve: {
alias: {
'@app': path.resolve(__dirname, './src/renderer/src/app'),
'@pages': path.resolve(__dirname, './src/renderer/src/pages'),
'@widgets': path.resolve(__dirname, './src/renderer/src/widgets'),
'@features': path.resolve(__dirname, './src/renderer/src/features'),
'@entities': path.resolve(__dirname, './src/renderer/src/entities'),
'@shared': path.resolve(__dirname, './src/renderer/src/shared')
}
}
}
})