vitest.config.ts 576 B

1234567891011121314151617181920212223242526
  1. const path = require('path');
  2. import { defineConfig } from 'vitest/config';
  3. export default defineConfig({
  4. build: {
  5. commonjsOptions: {
  6. transformMixedEsModules: true,
  7. },
  8. },
  9. test: {
  10. globals: true,
  11. mockReset: false,
  12. environment: 'jsdom',
  13. include: ['**/?(*.){test,spec}.?(c|m)[jt]s?(x)'],
  14. exclude: [
  15. '**/node_modules/**',
  16. '**/dist/**',
  17. '**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*',
  18. ],
  19. },
  20. resolve: {
  21. alias: {
  22. '@': path.resolve(__dirname, './src')
  23. },
  24. },
  25. });