cred402/frontend/vite.config.ts
caelum0x e40ea2aed2 feat: demo video of the live console + record script
- media/cred402-demo.mp4: 720p screencast of https://cred402.vercel.app driving the
  full loop with the Casper streaming-events feed updating live (proves the
  direct-CORS SSE end to end).
- scripts/record_demo.mjs + `npm run record:demo`: Playwright records the live site,
  ffmpeg muxes to MP4. Raw .webm is gitignored.
- README: link the demo video.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 01:08:27 +03:00

23 lines
764 B
TypeScript

import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
const API = process.env.CRED402_API ?? "http://localhost:4021";
// During dev, proxy API + x402 + SSE to the backend. In prod the backend serves
// the built assets directly, so these paths are same-origin.
export default defineConfig({
plugins: [react()],
server: {
port: 5173,
proxy: {
"/api": { target: API, changeOrigin: true },
"/v1": { target: API, changeOrigin: true },
"/graphql": { target: API, changeOrigin: true },
"/report": { target: API, changeOrigin: true },
"/metrics": { target: API, changeOrigin: true },
"/verify": { target: API, changeOrigin: true },
},
},
build: { outDir: "dist", emptyOutDir: true },
});