vitest.config.ts 788 B

1234567891011121314151617181920212223242526
  1. import { defineConfig } from 'vitest/config'
  2. import vue from '@vitejs/plugin-vue'
  3. import { fileURLToPath } from 'node:url'
  4. export default defineConfig({
  5. plugins: [vue()],
  6. test: {
  7. environment: 'jsdom',
  8. globals: true,
  9. setupFiles: ['./vitest.setup.ts'],
  10. deps: {
  11. inline: [/@nuxt/, /#app/, /#imports/]
  12. }
  13. },
  14. resolve: {
  15. alias: {
  16. '@': fileURLToPath(new URL('./', import.meta.url)),
  17. '~': fileURLToPath(new URL('./', import.meta.url)),
  18. '#app': fileURLToPath(new URL('./.nuxt/types/app.d.ts', import.meta.url)),
  19. '#imports': fileURLToPath(new URL('./.nuxt/types/imports.d.ts', import.meta.url))
  20. }
  21. },
  22. optimizeDeps: {
  23. include: ['vue', 'pinia']
  24. }
  25. })