Replace hash URLs with path-based routing, post-build prerender for money pages, Playwright smoke tests, and wrap the app in HelmetProvider so /donate mounts correctly. Co-authored-by: Cursor <cursoragent@cursor.com>
43 lines
948 B
TypeScript
43 lines
948 B
TypeScript
/// <reference types="vitest" />
|
|
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import path from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [react()],
|
|
test: {
|
|
globals: true,
|
|
environment: 'jsdom',
|
|
setupFiles: ['./src/test/setup.ts'],
|
|
css: true,
|
|
exclude: ['**/node_modules/**', '**/dist/**', 'mim-api/**', 'e2e/**'],
|
|
environmentOptions: {
|
|
jsdom: {
|
|
url: 'http://localhost:3000/',
|
|
},
|
|
},
|
|
coverage: {
|
|
reporter: ['text', 'json', 'html'],
|
|
exclude: [
|
|
'node_modules/',
|
|
'src/test/',
|
|
'**/*.d.ts',
|
|
'**/*.config.ts',
|
|
'dist/'
|
|
],
|
|
thresholds: {
|
|
global: {
|
|
branches: 80,
|
|
functions: 80,
|
|
lines: 80,
|
|
statements: 80
|
|
}
|
|
}
|
|
}
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': path.resolve(__dirname, './src')
|
|
}
|
|
}
|
|
}) |