inint
This commit is contained in:
@@ -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'],
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user