Files
hms-mediaengine/apps/web/vite.config.ts
T

33 lines
691 B
TypeScript
Raw Normal View History

import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
/**
* Vite-Konfiguration der HMS-MediaEngine-Weboberfläche (§17).
*
* Dev-Server-Proxy auf den Control Core (apps/control_server, Port 8000):
* - '/api' als HTTP-Proxy
* - '/ws' als WebSocket-Proxy (Snapshot + Deltas, §17.9)
* Same-Origin im Dev-Betrieb; produktiv übernimmt der Launcher/Reverse-Proxy.
*/
const proxy = {
'/api': {
target: 'http://localhost:8000',
},
'/ws': {
target: 'ws://localhost:8000',
ws: true,
},
} as const;
export default defineConfig({
plugins: [react()],
server: {
port: 5173,
proxy,
},
preview: {
port: 4173,
proxy,
},
});