-
Notifications
You must be signed in to change notification settings - Fork 18
/
vite.config.ts
49 lines (42 loc) · 968 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
42
43
44
45
46
47
48
49
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vitest/config'
import { isProduction } from './build/env'
import { createVitePlugins } from './build/plugins'
export default defineConfig({
base: './',
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
},
server: {
host: '0.0.0.0',
port: 10086
},
build: {
target: ['ios12'],
rollupOptions: {
input: {
main: fileURLToPath(new URL('./index.html', import.meta.url)),
desktop: fileURLToPath(new URL('./desktop.html', import.meta.url))
}
}
},
esbuild: {
drop: isProduction() ? ['console', 'debugger'] : []
},
test: {
environment: 'jsdom',
coverage: {
provider: 'istanbul'
},
setupFiles: ['tests/setup.ts'],
include: ['tests/**/*.spec.ts'],
server: {
deps: {
inline: ['@varlet/ui']
}
}
},
plugins: createVitePlugins()
})