vitest.config.ts 459 B

123456789101112131415161718
  1. import { fileURLToPath } from 'node:url'
  2. import { mergeConfig } from 'vite'
  3. import { configDefaults, defineConfig } from 'vitest/config'
  4. import viteConfig from './vite.config'
  5. export default mergeConfig(
  6. viteConfig,
  7. defineConfig({
  8. test: {
  9. environment: 'jsdom',
  10. exclude: [...configDefaults.exclude, 'e2e/*'],
  11. root: fileURLToPath(new URL('./', import.meta.url)),
  12. transformMode: {
  13. web: [/\.[jt]sx$/]
  14. }
  15. }
  16. })
  17. )