mirror of
https://github.com/OHV-IT/collabrix.git
synced 2025-12-15 16:48:36 +01:00
- Disabled HMR in production environment to prevent WebSocket conflicts - HMR not needed in reverse proxy setup with systemd service - Eliminates 'failed to connect to websocket' errors in browser console - Cleaner production deployment without development-specific features
27 lines
544 B
TypeScript
27 lines
544 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
host: '0.0.0.0',
|
|
port: 80,
|
|
allowedHosts: [
|
|
'collabrix.apex-project.de',
|
|
'192.168.0.12',
|
|
'localhost'
|
|
],
|
|
hmr: false, // HMR in Production-Umgebung deaktivieren
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://192.168.0.12:8000',
|
|
changeOrigin: true,
|
|
},
|
|
'/ws': {
|
|
target: 'ws://192.168.0.12:8000',
|
|
ws: true,
|
|
}
|
|
}
|
|
}
|
|
})
|