Files
memind/vite.config.ts
T
John 2e14873f2d Initial commit: Memind H5 portal with MindSpace, Plaza, and agent jobs.
Track application source and tests; exclude local env, user workspaces, and runtime data via .gitignore.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-15 15:04:43 -07:00

30 lines
693 B
TypeScript

import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
const portalTarget = env.H5_DEV_PORTAL ?? 'http://127.0.0.1:8081';
return {
plugins: [react()],
server: {
host: true,
port: 5173,
strictPort: true,
proxy: {
'/api': portalTarget,
'/auth': portalTarget,
'/admin-api': portalTarget,
'/MindSpace': portalTarget,
'^/u/': portalTarget,
'^/s/': portalTarget,
'^/user/': portalTarget,
},
},
build: {
outDir: 'dist',
emptyOutDir: true,
},
};
});