-
-
Notifications
You must be signed in to change notification settings - Fork 136
Expand file tree
/
Copy pathelectron.vite.config.js
More file actions
55 lines (53 loc) · 1.16 KB
/
electron.vite.config.js
File metadata and controls
55 lines (53 loc) · 1.16 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
54
55
/// <reference types="vitest/config" />
import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
import tailwindcss from '@tailwindcss/vite'
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'electron-vite'
const alias = {
'@': resolve('src/renderer'),
'~': resolve('src/main'),
root: resolve('./'),
'#': resolve('src/universal'),
apis: resolve('src/main/apis'),
'@core': resolve('src/main/apis/core'),
}
export default defineConfig({
main: {
build: {
externalizeDeps: true,
},
resolve: {
alias,
},
},
preload: {
build: {
externalizeDeps: true,
},
plugins: [],
resolve: {
alias,
},
},
renderer: {
root: resolve('src/renderer'),
base: './',
resolve: {
alias,
},
plugins: [
tailwindcss(),
vue(),
VueI18nPlugin({
/* options */
// locale messages resource pre-compile option
include: resolve(dirname(fileURLToPath(import.meta.url)), './src/renderer/i18n/locales/**'),
}),
],
server: {
port: 30303,
},
},
})