platform-codebase/@packages/@testing/test-utils/vitest.config.example-react.ts

31 lines
711 B
TypeScript
Raw Normal View History

/**
* Example Vitest Configuration for React Apps
*
* Copy this file to your app directory as `vitest.config.ts`
* and customize as needed.
*/
import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
import path from 'path'
import { reactTestConfig } from '@lilith/test-utils/vitest.config.base'
export default defineConfig({
plugins: [react()],
test: {
...reactTestConfig,
// Optional: Add app-specific setup file
setupFiles: ['./vitest.setup.ts'],
// Optional: Exclude e2e tests
exclude: [
...(reactTestConfig.exclude || []),
'**/e2e/**',
],
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
})