26 lines
623 B
TypeScript
26 lines
623 B
TypeScript
import { defineConfig } from '@vben/vite-config';
|
||
|
||
export default defineConfig(async () => {
|
||
return {
|
||
application: {},
|
||
vite: {
|
||
server: {
|
||
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,
|
||
},
|
||
},
|
||
},
|
||
},
|
||
};
|
||
});
|