- accessMode 切换为 backend:菜单由后端 /menu/all 动态驱动 - 子路由 path 改为相对(analytics/workspace/user 等),vue-router 拼接为 /dashboard/analytics - 修复 /workspace /analytics 等页面 404(中间层无 component 导致 children 无法渲染) - vxe-table 适配器补齐 CellTag/CellSwitch/CellOperation + VbenTableAction - enableRefreshToken 双token自动刷新 - 头像走 /api/files/preview 代理(avatars/ 免鉴权)
31 lines
856 B
TypeScript
31 lines
856 B
TypeScript
import { defineConfig } from '@vben/vite-config';
|
||
|
||
export default defineConfig(async () => {
|
||
return {
|
||
application: {},
|
||
vite: {
|
||
optimizeDeps: {
|
||
include: ['ant-design-x-vue'],
|
||
},
|
||
server: {
|
||
// Chromium 会阻止 6000 等不安全端口。5999 被占用时直接失败,避免 Vite 自动递增到不可访问端口。
|
||
strictPort: true,
|
||
proxy: {
|
||
'/api': {
|
||
changeOrigin: true,
|
||
// 代理到 .NET 后端 BuildFlow.Host
|
||
target: 'http://localhost:5667',
|
||
ws: true,
|
||
},
|
||
// SignalR Hub(聊天实时通信):与 /api 同后端,WebSocket 升级需 ws:true
|
||
'/hubs': {
|
||
changeOrigin: true,
|
||
target: 'http://localhost:5667',
|
||
ws: true,
|
||
},
|
||
},
|
||
},
|
||
},
|
||
};
|
||
});
|