Files
admin/vite.config.ts

21 lines
782 B
TypeScript
Raw Permalink Normal View History

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// The admin SPA talks to two backend route groups:
// /admin/* — operator console APIs (login, apps, skills, ...)
// /api/* — end-user Chat API (used by the skill test panel)
// During local dev both are proxied to the Go server on :8080. In the
// docker-compose deployment nginx serves the built assets and proxies the
// same prefixes to the backend container.
export default defineConfig({
plugins: [react()],
server: {
port: 5173,
proxy: {
'/admin': { target: 'http://localhost:8080', changeOrigin: true },
'/api': { target: 'http://localhost:8080', changeOrigin: true },
'/healthz': { target: 'http://localhost:8080', changeOrigin: true },
},
},
})