Files
BoosAPI/vite.config.ts
boos 9cfe8427b5
CI / Detect Docs Changes (push) Has been cancelled
CI / Test Core (push) Has been cancelled
CI / Build Web (push) Has been cancelled
CI / Build Server (push) Has been cancelled
CI / Build Desktop (push) Has been cancelled
CI / Typecheck (push) Has been cancelled
CI / Repo Drift Check (push) Has been cancelled
CI / Schema Check (SQLite) (push) Has been cancelled
CI / Schema Check (MySQL) (push) Has been cancelled
CI / Schema Check (Postgres) (push) Has been cancelled
CI / Build Docs (push) Has been cancelled
CI / Audit Production Dependencies (push) Has been cancelled
CI / Publish Docker Image (amd64) (push) Has been cancelled
CI / Publish Docker Image (arm64) (push) Has been cancelled
CI / Publish Docker Image (armv7) (push) Has been cancelled
CI / Publish Docker Manifest (push) Has been cancelled
CodeQL / Analyze (JavaScript/TypeScript) (javascript-typescript) (push) Has been cancelled
feat: rebrand Metapi to BoosAPI, add ComfyUI agent and user management
- Rename project from Metapi to BoosAPI across all UI and server strings
- Add ComfyUI conversational agent page (/comfyui-agent)
- Add user management system (register, login, API keys, admin)
- Update Dockerfile and database schema
- Add ComfyUI workflow nodes support
- Update shared contracts and platform configurations

Signed-off-by: Boos4721 <boos4721@icloud.com>
2026-05-15 20:20:58 +08:00

56 lines
1.6 KiB
TypeScript

import { defineConfig, loadEnv } from 'vite';
import react from '@vitejs/plugin-react';
import tailwindcss from '@tailwindcss/vite';
import { resolveDevProxyTarget } from './src/web/devProxyTarget';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
const proxyTarget = resolveDevProxyTarget(env);
console.log(`[vite] dev proxy target: ${proxyTarget}`);
const frontendPort = Number.parseInt(env.FRONTEND_PORT || env.VITE_FRONTEND_PORT || '', 10);
const resolvedFrontendPort = Number.isFinite(frontendPort) && frontendPort > 0 ? frontendPort : 5173;
const frontendHost = (env.VITE_DEV_HOST || '127.0.0.1').trim() || '127.0.0.1';
return {
root: 'src/web',
plugins: [react(), tailwindcss()],
build: {
outDir: '../../dist/web',
emptyOutDir: true,
rollupOptions: {
output: {
manualChunks(id) {
if (id.includes('@visactor/react-vchart') || id.includes('/@visactor/')) {
return 'vchart-vendor';
}
return undefined;
},
},
},
},
server: {
host: frontendHost,
port: resolvedFrontendPort,
proxy: {
'^/api($|/)': {
target: proxyTarget,
changeOrigin: true,
},
'^/monitor-proxy($|/)': {
target: proxyTarget,
changeOrigin: true,
},
'^/comfyui($|/)': {
target: proxyTarget,
changeOrigin: true,
},
'^/v1($|/)': {
target: proxyTarget,
changeOrigin: true,
},
},
},
};
});