vitest.config.ts 574 B

12345678910111213141516171819202122232425262728
  1. import { defineConfig } from 'vitest/config'
  2. import Vue from '@vitejs/plugin-vue'
  3. import VueJsx from '@vitejs/plugin-vue-jsx'
  4. import VueMacros from 'unplugin-vue-macros/vite'
  5. export default defineConfig({
  6. plugins: [
  7. VueMacros({
  8. setupComponent: false,
  9. setupSFC: false,
  10. plugins: {
  11. vue: Vue(),
  12. vueJsx: VueJsx(),
  13. },
  14. }),
  15. ],
  16. optimizeDeps: {
  17. disabled: true,
  18. },
  19. test: {
  20. clearMocks: true,
  21. environment: 'jsdom',
  22. setupFiles: ['./vitest.setup.ts'],
  23. transformMode: {
  24. web: [/\.[jt]sx$/],
  25. },
  26. },
  27. })