2025-11-21 04:32:08 +08:00
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [react()],
|
|
|
|
|
server: {
|
|
|
|
|
port: 3000,
|
|
|
|
|
proxy: {
|
|
|
|
|
'/api': {
|
|
|
|
|
target: 'http://localhost:8000',
|
|
|
|
|
changeOrigin: true
|
2025-11-27 02:56:24 +08:00
|
|
|
},
|
|
|
|
|
'/ws': {
|
|
|
|
|
target: 'ws://localhost:8000',
|
|
|
|
|
ws: true,
|
|
|
|
|
changeOrigin: true
|
2025-11-21 04:32:08 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|