26 lines
648 B
TypeScript
26 lines
648 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
import path from 'node:path';
|
|
|
|
// React SPA mounted at /admin-ai/ in production (FastAPI StaticFiles).
|
|
// In dev, runs at :5173 with proxy to FastAPI for /api/* + /health.
|
|
export default defineConfig({
|
|
base: '/admin-ai/',
|
|
plugins: [react()],
|
|
resolve: {
|
|
alias: { '@': path.resolve(__dirname, './src') },
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
sourcemap: true,
|
|
chunkSizeWarningLimit: 700,
|
|
},
|
|
server: {
|
|
port: 5173,
|
|
strictPort: true,
|
|
proxy: {
|
|
'/api': 'http://localhost:51300',
|
|
'/health': 'http://localhost:51300',
|
|
},
|
|
},
|
|
});
|