2
0

vitest.config.ts 676 B

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