Files
memind/ops/vite.config.ts
T
john 54de1dd8e3 Add local test domain setup (test.*.tkmind.cn).
DNS/TLS/proxy scripts and docs/local-dev.md replace localhost URLs for H5, memind_adm, Plaza, and Ops during local dev.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 09:55:04 +08:00

27 lines
733 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: {
host: '0.0.0.0',
port: 3002,
allowedHosts: ['.tkmind.cn', 'testops.tkmind.cn', 'localhost'],
proxy: {
'/admin-api': adminProxy,
'/api': adminProxy,
'/auth': authProxy,
},
},
build: {
outDir: 'dist',
emptyOutDir: true,
},
});