carbon-tokenization / frontend /vite.config.ts
tfrere's picture
tfrere HF Staff
feat(frontend): editor refresh (embed studio, comment popover, shiki, top bar, hooks, styles)
76fc93a
Raw
History Blame Contribute Delete
1.1 kB
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,
},
},
},
});