Browse Source

✨ feat(server): 添加开发环境API代理配置

- 配置/mini路径代理到本地10086服务
- 启用WebSocket支持以处理实时通信
yourname 4 months ago
parent
commit
b6e1a98766
1 changed files with 8 additions and 1 deletions
  1. 8 1
      vite.config.ts

+ 8 - 1
vite.config.ts

@@ -13,7 +13,14 @@ export default defineConfig({
     progressTrackingPlugin(),
   ],
   server: {
-    allowedHosts:true
+    allowedHosts:true,
+    proxy: {
+      '/mini': {
+        target: 'http://localhost:10086',
+        // changeOrigin: true,
+        ws: true
+      }
+    }
   },
   // 配置 @ 别名
   resolve: {