video-accessibility/frontend/vite.config.ts
2025-10-10 09:19:39 -05:00

45 lines
1 KiB
TypeScript

/// <reference types="vitest" />
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
// Base path: consistent across dev and production
base: '/video-accessibility/',
server: {
port: 6001, // Local development port
proxy: {
'/api': {
target: 'http://localhost:8003', // Docker container exposed port
changeOrigin: true,
ws: true, // Enable WebSocket proxying
},
},
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/test/setup.ts'],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html', 'lcov'],
exclude: [
'node_modules/',
'src/test/',
'**/*.d.ts',
'**/*.config.{js,ts}',
'**/main.tsx',
'**/vite-env.d.ts'
],
thresholds: {
global: {
branches: 80,
functions: 80,
lines: 80,
statements: 80
}
}
}
}
})