import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import { resolve } from "path"; export default defineConfig({ plugins: [react()], resolve: { alias: { "#shared": resolve(__dirname, "../backend/src/shared"), }, }, server: { port: 5678, proxy: { "/collab": { target: "ws://localhost:8080", ws: true, }, "/api": { target: "http://localhost:8080", changeOrigin: true, // PDF generation can take 15-25s; the SSE stream also needs a long // idle tolerance. Bumping both timeouts to 60s covers the worst case. timeout: 60_000, proxyTimeout: 60_000, }, "/uploads": { target: "http://localhost:8080", changeOrigin: true, }, "/published": { target: "http://localhost:8080", changeOrigin: true, }, "/oauth": { target: "http://localhost:8080", changeOrigin: true, }, "/auth": { target: "http://localhost:8080", changeOrigin: true, }, }, }, });