Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-20 10:59:21 +08:00

perf: 优化预热常用文件功能

This commit is contained in:
pany 2024-12-13 19:38:19 +08:00
parent 5aa09b05db
commit c643b410ef

View File

@ -34,7 +34,7 @@ export default defineConfig(({ mode }) => {
// 端口被占用时,是否直接退出
strictPort: false,
// 是否自动打开浏览器
open: false,
open: true,
// 反向代理
proxy: {
"/api/v1": {
@ -49,7 +49,11 @@ export default defineConfig(({ mode }) => {
cors: true,
// 预热常用文件,提高初始页面加载速度
warmup: {
clientFiles: ["./src/layouts/**/*.vue"]
clientFiles: [
"./src/layouts/**/*.*",
"./src/pinia/**/*.*",
"./src/router/**/*.*"
]
}
},
// 构建配置