eab91174db
Co-Authored-By: Claude <noreply@anthropic.com>
18 lines
463 B
TypeScript
18 lines
463 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
// 孕妇端开发服务器:将 /api 代理到本地 NestJS 后端(默认 3000)。
|
|
// 生产环境可改为环境变量配置的网关地址。
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
port: 5173,
|
|
proxy: {
|
|
'/api': {
|
|
target: process.env.PCM_API_TARGET ?? 'http://localhost:3000',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
});
|