This commit is contained in:
艾贤凌
2026-03-16 12:05:55 +08:00
parent af3a7c83e8
commit 6d4a72161f
33 changed files with 5671 additions and 178 deletions

View File

@@ -14,7 +14,22 @@ export default defineConfig({
'/api': {
target: 'http://localhost:3001',
changeOrigin: true,
// rewrite: (path) => path.replace(/^\/api/, '')
}
}
},
build: {
// 构建目标:现代浏览器
target: 'es2020',
// chunk 大小警告阈值kB
chunkSizeWarningLimit: 1500,
rollupOptions: {
output: {
// 将大型依赖拆分为独立 chunk利用浏览器缓存
manualChunks: {
'vendor-vue': ['vue', 'vue-router'],
'vendor-element': ['element-plus'],
'vendor-axios': ['axios'],
}
}
}
}