import { defineConfig } from 'vitest/config'; import react from '@vitejs/plugin-react'; export default defineConfig({ plugins: [react()], test: { environment: 'happy-dom', environmentOptions: { happyDOM: { settings: { disableIframePageLoading: true, disableJavaScriptFileLoading: true, disableCSSFileLoading: true, } } }, globals: true, setupFiles: ['./tests/setup.tsx'], alias: { 'next/server': 'next/server.js', '@payload-config': new URL('./tests/__mocks__/payload-config.ts', import.meta.url).pathname, '@': new URL('./', import.meta.url).pathname, }, exclude: ['**/node_modules/**', '**/.next/**'], server: { deps: { inline: ['next-intl', '@mintel/next-utils'], }, }, }, });