Files
Charon/frontend/vite.config.ts
GitHub Actions d6f913b92d fix: resolve React 19 production runtime error with lucide-react icons
- Updated package.json to include @types/node@25.0.3 for compatibility.
- Modified package-lock.json to reflect the new version of @types/node and updated cookie package to 1.1.1.
- Adjusted tsconfig.json to specify @testing-library/jest-dom/vitest for type definitions.
- Updated vite.config.ts to disable code splitting temporarily to diagnose React initialization issues, increasing chunk size warning limit.
2026-01-07 06:48:40 +00:00

51 lines
1.2 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,
// TEMPORARY: Disable code splitting to diagnose React initialization issue
// If this works, the problem is module loading order in async chunks
chunkSizeWarningLimit: 2000,
rollupOptions: {
output: {
// Disable code splitting - bundle everything into one file
manualChunks: undefined,
inlineDynamicImports: true
}
}
}
})