- Changed development port for studio-panel from 3001 to 3020 in package.json and vite.config.ts. - Refactored Studio component in studio-panel to improve token handling and error diagnostics. - Added utility functions for token validation and JWT decoding in Studio component. - Enhanced error handling and user feedback in Studio component when token is invalid. - Implemented sessionStorage management for token and server URL in Studio component. - Created Docker setup for broadcast-panel including Dockerfile, Dockerfile.dev, and docker-compose.yml. - Added Nginx configuration for serving the broadcast-panel as a Single Page Application. - Introduced Banner component in broadcast-panel for displaying messages and actions. - Added start-docker.sh script for easy Docker management of broadcast-panel. - Implemented Playwright E2E tests for token handling and UI interactions between broadcast-panel and studio-panel. - Included SSL certificates for local development in studio-panel.
24 lines
796 B
TypeScript
24 lines
796 B
TypeScript
import { defineConfig, loadEnv } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
export default defineConfig(({ mode }) => {
|
|
// Cargar variables de entorno del directorio raíz
|
|
const env = loadEnv(mode, '../../', '')
|
|
|
|
return {
|
|
plugins: [react()],
|
|
server: {
|
|
port: 3020,
|
|
host: true,
|
|
// Usar HTTP en dev para pruebas E2E locales (localhost permite getUserMedia sin HTTPS en muchos navegadores)
|
|
watch: { usePolling: true }
|
|
},
|
|
define: {
|
|
// Exponer variables de entorno al cliente
|
|
'import.meta.env.VITE_LIVEKIT_URL': JSON.stringify(env.LIVEKIT_URL),
|
|
'import.meta.env.VITE_LIVEKIT_API_KEY': JSON.stringify(env.LIVEKIT_API_KEY),
|
|
'import.meta.env.VITE_LIVEKIT_API_SECRET': JSON.stringify(env.LIVEKIT_API_SECRET),
|
|
},
|
|
}
|
|
})
|