Files
EventHubFrontAdmin/vite.config.ts
T
2026-07-08 17:56:07 +03:00

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,
},
},
},
});