-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.js
48 lines (47 loc) · 1.13 KB
/
vite.config.js
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
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { VitePWA } from 'vite-plugin-pwa'
import svgLoader from 'vite-svg-loader'
// https://vitejs.dev/config/
export default defineConfig({
server:{
host: '0.0.0.0',
},
plugins: [
vue(),
svgLoader(),
VitePWA({
registerType: 'autoUpdate',
manifest: {
"name": "Find Zima",
"short_name": "Zima",
"start_url": "/",
"display": "standalone",
"background_color": "#0d0d0d",
"theme_color": "#0d0d0d",
"icons": [
{
"src": "/zima-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/zima-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}
}),
],
css: {
postcss: './postcss.config.cjs', // 指定 PostCSS 配置文件
},
test: {
// 启用类似 jest 的全局测试 API
globals: true,
// 使用 happy-dom 模拟 DOM
// 这需要你安装 happy-dom 作为对等依赖(peer dependency)
environment: 'happy-dom'
}
})