2026-02-22 15:54:32 +00:00
|
|
|
import { defineConfig } from 'vite'
|
|
|
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
|
|
2026-02-25 22:02:25 +00:00
|
|
|
const API_TARGET = process.env.VITE_API_TARGET || 'http://localhost:8000'
|
|
|
|
|
|
2026-02-22 15:54:32 +00:00
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [react(), tailwindcss()],
|
|
|
|
|
server: {
|
|
|
|
|
proxy: {
|
|
|
|
|
'/api': {
|
2026-02-25 22:02:25 +00:00
|
|
|
target: API_TARGET,
|
2026-02-22 15:54:32 +00:00
|
|
|
changeOrigin: true,
|
|
|
|
|
},
|
|
|
|
|
'/ws': {
|
2026-02-25 22:02:25 +00:00
|
|
|
target: API_TARGET.replace('http', 'ws'),
|
2026-02-22 15:54:32 +00:00
|
|
|
ws: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
})
|