import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' // https://vite.dev/config/ export default defineConfig({ base: '/ui/', publicDir: 'public', // 默认就是 public plugins: [react()], server: { proxy: { '/tiles': { target: 'http://192.168.1.102:9081', }, '/api': { target: 'http://192.168.1.102:9081', changeOrigin: true, }, '/websocket': { target: 'http://192.168.1.102:9081', ws: true, // ☆ 必须 ☆ changeOrigin: true }, '/aircraftlist.json': { target: 'http://192.168.1.102:9081', }, '/map': { target: 'http://localhost:5173/ui/index.html' }, '/dsp': { target: 'http://localhost:5173/ui/index.html' }, '/aircraftlist': { target: 'http://localhost:5173/ui/index.html' }, '/settings': { target: 'http://localhost:5173/ui/index.html' }, }, fs:{ strict: false } }, build: { outDir: 'C:\\Users\\wyc\\Desktop\\version_control\\v1.0.3\\wwwroot' // "outDir": "./dist" } })