Files
opendance-web/web-server/admin/vite.config.ts
T

31 lines
714 B
TypeScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
const API_TARGET = 'http://localhost:3000';
// base './' 让产物可挂在任意子路径;开发期 /api 与 /health 代理到 NestJS 服务。
export default defineConfig({
base: './',
plugins: [react()],
server: {
port: 5173,
strictPort: true,
proxy: {
'/api': {
target: API_TARGET,
changeOrigin: true,
},
'/health': {
target: API_TARGET,
changeOrigin: true,
},
},
},
build: {
outDir: 'dist',
sourcemap: false,
// VRM 预览分包内是 three.js 本体(约 750 kB),属于预期体积。
chunkSizeWarningLimit: 900,
},
});