Public source validation / validate (push) Failing after 3m8s
32 lines
977 B
TypeScript
32 lines
977 B
TypeScript
import { defineConfig } from 'vitest/config';
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
test: {
|
|
environment: 'jsdom',
|
|
setupFiles: ['./tests/setup.ts'],
|
|
include: ['./tests/unit/**/*.test.{ts,tsx}'],
|
|
restoreMocks: true,
|
|
clearMocks: true,
|
|
coverage: {
|
|
provider: 'v8',
|
|
reporter: ['text', 'json-summary'],
|
|
include: ['src/MetricWidgets.tsx', 'src/systemStatus.ts'],
|
|
},
|
|
},
|
|
build: {
|
|
rollupOptions: {
|
|
output: {
|
|
// The React runtime is stable across deploys and shared by every route,
|
|
// so it is worth its own long-lived chunk. Route-level splitting is
|
|
// driven by React.lazy in App.tsx.
|
|
manualChunks(id: string) {
|
|
if (id.includes('/node_modules/react-dom/') || id.includes('/node_modules/react/') || id.includes('/node_modules/scheduler/')) return 'react-vendor';
|
|
return undefined;
|
|
},
|
|
},
|
|
},
|
|
},
|
|
});
|