Files
ozon-seller-kit/studio/vite.config.ts
T
2026-08-14 18:27:45 +08:00

25 lines
716 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 { fileURLToPath, URL } from 'node:url';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
// 前端开发服务器,/api 代理到本地 FastAPIserver/
export default defineConfig({
plugins: [react()],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
server: {
port: 8900,
strictPort: true, // 端口被占用时直接报错,而不是自动改到别的端口
open: true, // 启动后自动打开浏览器
proxy: {
'/api': {
target: 'http://127.0.0.1:8800',
changeOrigin: true,
},
},
},
});