perf: 优化预热常用文件功能
This commit is contained in:
parent
5aa09b05db
commit
c643b410ef
@ -34,7 +34,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
// 端口被占用时,是否直接退出
|
// 端口被占用时,是否直接退出
|
||||||
strictPort: false,
|
strictPort: false,
|
||||||
// 是否自动打开浏览器
|
// 是否自动打开浏览器
|
||||||
open: false,
|
open: true,
|
||||||
// 反向代理
|
// 反向代理
|
||||||
proxy: {
|
proxy: {
|
||||||
"/api/v1": {
|
"/api/v1": {
|
||||||
@ -49,7 +49,11 @@ export default defineConfig(({ mode }) => {
|
|||||||
cors: true,
|
cors: true,
|
||||||
// 预热常用文件,提高初始页面加载速度
|
// 预热常用文件,提高初始页面加载速度
|
||||||
warmup: {
|
warmup: {
|
||||||
clientFiles: ["./src/layouts/**/*.vue"]
|
clientFiles: [
|
||||||
|
"./src/layouts/**/*.*",
|
||||||
|
"./src/pinia/**/*.*",
|
||||||
|
"./src/router/**/*.*"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 构建配置
|
// 构建配置
|
||||||
|
Loading…
x
Reference in New Issue
Block a user