import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; const host = process.env.HOST ?? "127.0.0.1"; const clientPort = Number(process.env.CLIENT_PORT ?? 5173); const apiPort = Number(process.env.PORT ?? 8787); export default defineConfig({ plugins: [react()], server: { host, port: clientPort, allowedHosts: ["gahow-pc.ipads-lab.se.sjtu.edu.cn"], proxy: { "/api": `http://127.0.0.1:${apiPort}` } } });