Files
2026Technology-Competition/frontend/vite.config.ts
T

16 lines
471 B
TypeScript
Raw 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 { defineConfig } from 'vite';
// 开发用 Vite dev server:提供 HMR,并把 API / 静态资源代理到本地 FastAPI(:8000)。
// 生产构建仍走 esbuildnpm run build)。
export default defineConfig({
root: '.',
server: {
host: '127.0.0.1',
port: 5173,
proxy: {
'/api': { target: 'http://127.0.0.1:8000', changeOrigin: true, ws: true },
'/static': { target: 'http://127.0.0.1:8000', changeOrigin: true },
},
},
});