Files
SakurasanandClaude Sonnet 5 489a79564c feat(web): management console frontend
Vue 3 + TS + Vite + Tailwind with self-built UI components. Landing,
auth, user dashboard (keys/usage/settings), and admin console
(overview/models/channels/users/usage/config). Theme system
(light/dark/system) with pre-paint boot script, theme-aware ECharts,
and a channel editor with multi-format (Anthropic/OpenAI) selection.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-15 21:05:02 +08:00

32 lines
902 B
TypeScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { fileURLToPath, URL } from 'node:url'
// Dev: proxy /api and /v1 to the Go backend so the browser stays same-origin
// (no CORS, and the HttpOnly refresh cookie flows through the proxy).
const backend = process.env.VITE_PROXY_TARGET || 'http://localhost:18080'
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
server: {
port: 5173,
proxy: {
'/api': { target: backend, changeOrigin: true },
'/v1': { target: backend, changeOrigin: true },
},
},
preview: {
host: true, // bind 0.0.0.0 so the built SPA is reachable over the public IP
port: 5173,
proxy: {
'/api': { target: backend, changeOrigin: true },
'/v1': { target: backend, changeOrigin: true },
},
},
})