quality-inspection-platform/frontend-admin/vite.config.js
qihongkun d810abdcee 初始化仓库:AI 接口自动化测试平台
纳入 FastAPI 后端、Vue 管理端、MCP 桥接与文档;通过 .gitignore 排除本地数据库与构建产物。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-22 15:44:50 +08:00

34 lines
735 B
JavaScript

import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
export default defineConfig({
plugins: [vue()],
server: {
host: "0.0.0.0",
port: 5173,
proxy: {
"^/api(?:/|$)": {
target: "http://127.0.0.1:8000",
changeOrigin: true,
},
"^/docs(?:/|$)": {
target: "http://127.0.0.1:8000",
changeOrigin: true,
},
"^/openapi\\.json$": {
target: "http://127.0.0.1:8000",
changeOrigin: true,
},
"^/mcp(?:/|$)": {
target: "http://127.0.0.1:8000",
changeOrigin: true,
},
"^/ws(?:/|$)": {
target: "ws://127.0.0.1:8000",
ws: true,
changeOrigin: true,
},
},
},
});