kv-netflix/frontend-react/vite.config.ts
vndangkhoa 056824cfa8 Refactor: Clean up codebase and improve project structure
- Remove debug files, binaries, and temp outputs from repo
- Update .gitignore to exclude cache, logs, and build artifacts
- Fix CI/CD workflow for Go backend (was referencing Python)
- Add graceful shutdown and config module to backend
- Add SSRF protection with URL validation
- Refactor handlers to reduce code duplication
- Add React ErrorBoundary component
- Add lazy loading for frontend routes
- Setup Vitest for frontend testing
- Update Dockerfile to use Go 1.23
2026-02-18 19:00:22 +07:00

57 lines
1.3 KiB
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { VitePWA } from 'vite-plugin-pwa'
export default defineConfig({
plugins: [
react(),
VitePWA({
registerType: 'autoUpdate',
includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'mask-icon.svg'],
manifest: {
name: 'StreamFlow',
short_name: 'StreamFlow',
description: 'Modern Movie Streaming Service',
theme_color: '#141414',
background_color: '#141414',
display: 'standalone',
icons: [
{
src: 'pwa-192x192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: 'pwa-512x512.png',
sizes: '512x512',
type: 'image/png'
},
{
src: 'pwa-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable'
}
]
},
devOptions: {
enabled: false
}
})
],
server: {
proxy: {
'/api': {
target: 'http://localhost:8000',
changeOrigin: true,
secure: false,
},
},
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/test/setup.ts'],
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
},
})