import { loadEnv } from "vite"; import { defineConfig } from "vitest/config"; import react from "@vitejs/plugin-react-swc"; export default defineConfig(({ mode }) => { const env = loadEnv(mode, ".", ""); const platformProxyTarget = env.PLATFORM_API_PROXY || "http://127.0.0.1:8080"; return { plugins: [react()], server: { host: "127.0.0.1", port: 5173, // Plugin pages and their assets live outside platform_web, so the dev server must serve the repository root too. fs: { allow: [".", ".."] }, proxy: { "/api/v1": platformProxyTarget, "/healthz": platformProxyTarget } }, preview: { host: "127.0.0.1", port: 4173 }, test: { environment: "node" } }; });