import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; /** Vite 配置:开发服务器端口与 API 反向代理(指向后端 8010)。 */ export default defineConfig({ plugins: [react()], server: { port: 5173, proxy: { "/api": "http://localhost:8010", "/health": "http://localhost:8010", }, }, });