vitest.config.ts 538 B

12345678910111213141516171819
  1. import { defineConfig } from 'vitest/config'
  2. import Vue from '@vitejs/plugin-vue'
  3. import VueJsx from '@vitejs/plugin-vue-jsx'
  4. import DefineOptions from 'unplugin-vue-define-options/vite'
  5. export default defineConfig({
  6. plugins: [Vue(), VueJsx(), DefineOptions()],
  7. optimizeDeps: {
  8. disabled: true
  9. },
  10. test: {
  11. clearMocks: true,
  12. environment: 'jsdom',
  13. //setup 文件的路径。它们将运行在每个测试文件之前。
  14. setupFiles: ['./vitest.setup.ts'],
  15. transformMode: {
  16. web: [/\.[jt]sx$/]
  17. }
  18. }
  19. })