95846bde1e
Co-authored-by: Cursor <cursoragent@cursor.com>
24 lines
662 B
TypeScript
24 lines
662 B
TypeScript
import { defineConfig } from 'vite';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
const apiBaseUrl = process.env.VITE_API_BASE_URL ?? 'https://admin-api.dev.eventhub.local';
|
|
const wsUrl = process.env.VITE_WS_URL ?? 'wss://admin-ws.dev.eventhub.local';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
proxy: {
|
|
'/v1': {
|
|
target: apiBaseUrl,
|
|
changeOrigin: true,
|
|
secure: false,
|
|
},
|
|
'/admin/ws': {
|
|
target: wsUrl,
|
|
ws: true,
|
|
changeOrigin: true,
|
|
secure: false,
|
|
},
|
|
},
|
|
},
|
|
}); |