49 lines
1.1 KiB
JavaScript
49 lines
1.1 KiB
JavaScript
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://127.0.0.1',
|
|
|
|
},
|
|
'/api': {
|
|
target: 'http://127.0.0.1',
|
|
changeOrigin: true,
|
|
},
|
|
'/ws': {
|
|
target: 'http://127.0.0.1', // drogon 的端口!!
|
|
ws: true, // ☆ 必须 ☆
|
|
changeOrigin: true
|
|
},
|
|
'/aircraftlist.json': {
|
|
target: 'http://127.0.0.1'
|
|
},
|
|
'/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: 'D:\\ae\\proj\\projects\\ECAP_Server\\webapp\\wwwroot'
|
|
}
|
|
})
|
|
|