-
-
Notifications
You must be signed in to change notification settings - Fork 247
Expand file tree
/
Copy pathvite.config.mjs
More file actions
53 lines (51 loc) · 1.16 KB
/
vite.config.mjs
File metadata and controls
53 lines (51 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
import path from 'node:path'
import tailwindcss from '@tailwindcss/vite'
import vue from '@vitejs/plugin-vue'
import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { defineConfig } from 'vite'
const root = path.resolve(__dirname)
const rootSrc = path.resolve(__dirname, 'src')
const rootRenderer = path.resolve(__dirname, 'src/renderer')
export default defineConfig({
root: rootRenderer,
base: './',
plugins: [
vue(),
tailwindcss(),
AutoImport({
imports: ['vue'],
}),
Components({
dirs: [`${rootRenderer}/components`],
extensions: ['vue'],
dts: true,
directoryAsNamespace: true,
collapseSamePrefixes: true,
}),
],
build: {
outDir: path.resolve(__dirname, 'build/renderer'),
emptyOutDir: true,
},
resolve: {
alias: {
'@': rootRenderer,
'~': rootSrc,
},
},
define: {
'process.env': {},
'process': {},
},
server: {
watch: {
ignored: [
`${root}/src/main/i18n/locales/**/*`,
`${root}/scripts/**/*`,
`${root}/build/**/*`,
`${root}/src/main/**/*`,
],
},
},
})