20 lines
452 B
TypeScript
20 lines
452 B
TypeScript
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: process.env.VITE_BACKEND_URL || 'http://localhost:8000',
|
|
changeOrigin: true
|
|
},
|
|
'/ws': {
|
|
target: process.env.VITE_BACKEND_WS_URL || 'ws://localhost:8000',
|
|
ws: true
|
|
}
|
|
}
|
|
}
|
|
}) |