import { defineConfig, loadEnv } from "vite"; import process from "process"; import react from "@vitejs/plugin-react"; export default defineConfig(({ command, mode }) => { const env = loadEnv(mode, process.cwd()); return { plugins: [react()], server: { port: 5173, host: true, watch: { usePolling: true, }, esbuild: { target: "esnext", platform: "linux", }, }, define: { VITE_SOCKET_URL: JSON.stringify(env.VITE_SOCKET_URL), }, }; });