Files
engine/hanzo-cli/webui/vite.config.ts
zeekay 677e67ffd7 Serve the UI APIs under /v1
The CLI UI's calls move from /ui/api/* to /ui/v1/*, web-chat's from
/api/* to /v1/*. An unknown UI path now 404s instead of falling back
to index.html, which would answer a stale /api/ call with 200. The
pre-Svelte static files nothing loads are gone.

Claude-Session: https://claude.ai/code/session_01TUxvfuta1Z44KVNYuAz71F
2026-09-24 15:01:47 -07:00

21 lines
495 B
TypeScript

import { defineConfig } from "vite";
import { svelte } from "@sveltejs/vite-plugin-svelte";
import tailwindcss from "@tailwindcss/vite";
export default defineConfig({
plugins: [tailwindcss(), svelte()],
base: "./",
build: {
outDir: "../static",
emptyOutDir: true,
},
server: {
proxy: {
"/v1": "http://localhost:1234",
"/ui/v1": "http://localhost:1234",
"/ui/uploads": "http://localhost:1234",
"/ui/speech": "http://localhost:1234",
},
},
});