Files
Charon/frontend/vite.config.ts
GitHub Actions b86aa3921b feat(dns): add custom DNS provider plugin system
- Add plugin interface with lifecycle hooks (Init/Cleanup)
- Implement thread-safe provider registry
- Add plugin loader with SHA-256 signature verification
- Migrate 10 built-in providers to registry pattern
- Add multi-credential support to plugin interface
- Create plugin management UI with enable/disable controls
- Add dynamic credential fields based on provider metadata
- Include PowerDNS example plugin
- Add comprehensive user & developer documentation
- Fix frontend test hang (33min → 1.5min, 22x faster)

Platform: Linux/macOS only (Go plugin limitation)
Security: Signature verification, directory permission checks

Backend coverage: 85.1%
Frontend coverage: 85.31%

Closes: DNS Challenge Future Features - Phase 5
2026-01-07 02:54:01 +00:00

81 lines
2.1 KiB
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
}
}
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: './src/setupTests.ts',
testTimeout: 10000, // 10 seconds max per test
hookTimeout: 10000, // 10 seconds for beforeEach/afterEach
coverage: {
provider: 'istanbul',
reporter: ['text', 'json-summary', 'lcov'],
reportsDirectory: './coverage',
exclude: [
'node_modules/',
'src/setupTests.ts',
'**/*.d.ts',
'**/*.config.*',
'**/mockData',
'dist/'
]
}
},
build: {
outDir: 'dist',
sourcemap: true,
// Increase chunk size warning limit to 600KB (reasonable for modern networks)
chunkSizeWarningLimit: 600,
// Code splitting for better caching and parallel loading
rollupOptions: {
output: {
manualChunks: (id) => {
// React core - changes rarely
if (id.includes('node_modules/react') ||
id.includes('node_modules/react-dom') ||
id.includes('node_modules/react-router')) {
return 'react-vendor'
}
// TanStack Query - changes rarely
if (id.includes('node_modules/@tanstack/react-query')) {
return 'query'
}
// Radix UI components - large and stable
if (id.includes('node_modules/@radix-ui')) {
return 'radix-ui'
}
// Recharts for dashboard - large but used infrequently
if (id.includes('node_modules/recharts')) {
return 'recharts'
}
// Icons - large but cacheable
if (id.includes('node_modules/lucide-react')) {
return 'icons'
}
// All other node_modules into vendor chunk
if (id.includes('node_modules')) {
return 'vendor'
}
}
}
}
}
})