Files
Piik/vite.config.ts
T
AAA da47189fc3 refactor: unify Go runtime and audited frontend
Squash integration of the reviewed Go core, frontend audit fixes, release tooling, and deployment hygiene. CI passed all Server/Client jobs.
2026-09-06 23:26:01 +08:00

28 lines
857 B
TypeScript

import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
// The Go server owns /api, /healthz and /signal; everything else (including
// /r/<roomId> invitation paths) is the SPA that Vite already serves. Keeping the
// Browser origin on 8787 leaves PUBLIC_BASE_URL, ALLOWED_ORIGINS, the README and
// the LAN-phone instructions unchanged; the Go dev server moves to 8788.
const server = "http://127.0.0.1:8788";
export default defineConfig({
plugins: [react()],
build: {
outDir: "internal/server/webassets/dist",
emptyOutDir: false,
},
server: {
// host: true keeps the documented LAN-phone workflow reachable.
host: true,
port: 8787,
strictPort: true,
proxy: {
"/api": { target: server },
"/healthz": { target: server },
"/signal": { target: server, ws: true },
},
},
});