Files
memind/vite.config.ts
T
john fde6503bdf
Memind CI / Test, build, and release guards (push) Has been cancelled
feat(mindspace): add SEO/GEO delivery, page template catalog, and admin hooks
Enable optional SEO/GEO injection and discovery routes for confirmed public pages while keeping private pages noindex. Add premium page template skills, portal catalog API, template shop UI, and Baidu push gated by memind_adm config.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 08:06:12 +08:00

40 lines
1.2 KiB
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';
// Platform super-admin API now lives in the standalone memind_adm service.
const adminTarget = env.H5_DEV_ADMIN ?? 'http://127.0.0.1:8082';
return {
plugins: [react()],
server: {
host: true,
port: 5173,
strictPort: true,
allowedHosts: ['127.0.0.1', 'localhost', '.localhost'],
watch: {
// User workspace trees sync HTML/skills frequently; watching them causes reload loops.
ignored: ['**/MindSpace/**', '**/data/**', '**/reports/**', '**/.git/**'],
},
proxy: {
'/api': portalTarget,
'/auth': portalTarget,
'/analytics': portalTarget,
'/admin-api': adminTarget,
'/MindSpace': portalTarget,
'/dev': portalTarget,
'/brand': portalTarget,
'^/u/': portalTarget,
'^/s/': portalTarget,
'^/user/': portalTarget,
},
},
build: {
outDir: 'dist',
emptyOutDir: true,
},
};
});