Files
memind/ops/vite.config.ts
T
john 67348db026 Fix ops admin back link and local /admin-api proxy.
Use SPA root for the return-to-ops nav and proxy /admin-api in Vite dev so super-admin API calls work locally.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 08:59:07 +08:00

25 lines
644 B
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
// /auth (login + session status) is served by the public portal; the ops
// console API (/api/ops/v1) lives in the standalone memind_adm service.
const authProxy = process.env.OPS_API_PROXY ?? 'http://127.0.0.1:8081';
const adminProxy = process.env.OPS_ADMIN_PROXY ?? 'http://127.0.0.1:8082';
export default defineConfig({
base: '/ops/',
plugins: [react()],
server: {
port: 3002,
proxy: {
'/admin-api': adminProxy,
'/api': adminProxy,
'/auth': authProxy,
},
},
build: {
outDir: 'dist',
emptyOutDir: true,
},
});