import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'

// https://vite.dev/config/
export default defineConfig({
  plugins: [react()],
  server: {
    allowedHosts: ['demo.v1ru5.cl'],
    proxy: {
      '/api': {
        target: 'http://backend:3000',
        changeOrigin: true
      },
      '/socket.io': {
        target: 'http://backend:3000',
        ws: true
      },
      '/video_feed': {
        target: 'http://alpr-service:5001',
        changeOrigin: true
      },
      '/dataset': {
        target: 'http://alpr-service:5001',
        changeOrigin: true
      }
    }
  }
})
