-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
41 lines (39 loc) · 909 Bytes
/
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
/// <reference types="vitest" />
import { resolve } from 'node:path'
import { defineConfig } from 'vite'
import AutoImport from 'unplugin-auto-import/vite'
import AutoImportComponent from 'unplugin-vue-components/vite'
import { alias } from './alias'
export default defineConfig({
resolve: {
alias: {
...alias,
'@app-electron': resolve(process.cwd(), 'app', 'electron'),
'@app-web': resolve(process.cwd(), 'app', 'web'),
},
},
test: {
environment: 'happy-dom',
testTimeout: 5000 * 3,
hookTimeout: 10000,
globals: true,
},
plugins: [
AutoImport({
dts: './app/web/auto-imports.d.ts',
dirs: [
'./app/web/composable',
],
imports: [
'vue',
'vue/macros',
],
}),
AutoImportComponent({
dts: './app/web/components.d.ts',
dirs: [
'./app/web/components',
],
}),
],
})