aps-agent/client/app/vite.config.ts

17 lines
482 B
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
/**
* 客户端构建配置(任务 A1.4)。
* 开发期把 /v1 代理到本地平台服务,避免跨端口与 CORS;构建产物由平台服务托管(A1.5)。
*/
export default defineConfig({
plugins: [react()],
server: {
port: 5173,
proxy: {
'/v1': { target: 'http://127.0.0.1:5199', changeOrigin: true },
},
},
build: { outDir: 'dist', emptyOutDir: true },
});