feat: add modular Security Dashboard implementation plan with environment-driven security service activation fix: update go.mod and go.sum for dependency version upgrades and optimizations feat: enable gzip compression for API responses to reduce payload size fix: optimize SQLite connection settings for better performance and concurrency refactor: enhance RequireAuth component with consistent loading overlay feat: configure global query client with optimized defaults for performance in main.tsx refactor: replace health check useEffect with React Query for improved caching and auto-refresh build: add code splitting in vite.config.ts for better caching and parallel loading
34 lines
795 B
TypeScript
34 lines
795 B
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
server: {
|
|
port: 3000,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8080',
|
|
changeOrigin: true
|
|
}
|
|
}
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
sourcemap: true,
|
|
// Code splitting for better caching and parallel loading
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
// React ecosystem - changes rarely
|
|
'react-vendor': ['react', 'react-dom', 'react-router-dom'],
|
|
// TanStack Query - changes rarely
|
|
'query': ['@tanstack/react-query'],
|
|
// Icons - large but cacheable
|
|
'icons': ['lucide-react'],
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|