添加静态菜单及对应空白页面;

This commit is contained in:
lucienteng
2024-09-03 11:12:14 +08:00
parent 8881708e2b
commit 3352e03935
35 changed files with 516 additions and 3 deletions

View File

@@ -24,7 +24,20 @@ export default ({ mode }: ConfigEnv): UserConfigExport => {
port: VITE_PORT,
host: "0.0.0.0",
// 本地跨域代理 https://cn.vitejs.dev/config/server-options.html#server-proxy
proxy: {},
proxy: {
// 第一个代理后端地址
"/api": {
target: "http://127.0.0.1:3000",
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, "")
},
// 第二个代理后端地址
"/otherApi": {
target: "http://127.0.0.1:3290",
changeOrigin: true,
rewrite: path => path.replace(/^\/otherApi/, "")
}
},
// 预热文件以提前转换和缓存结果,降低启动期间的初始页面加载时长并防止转换瀑布
warmup: {
clientFiles: ["./index.html", "./src/{views,components}/*"]