import { defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react';

export default defineConfig({
    plugins: [react()],
    resolve: {
        alias: {
            '@': __dirname,
            'next/server': 'next/server.js',
        },
    },
    ssr: {
        noExternal: ['@mintel/next-utils', 'next-intl'],
    },
    test: {
        environment: 'happy-dom',
        globals: true,
        exclude: ['**/node_modules/**', '**/.next/**', '**/dist/**'],
        include: ['**/*.test.{ts,tsx}'],
        coverage: {
            provider: 'v8',
            reporter: ['text', 'json', 'html'],
        },
    },
});
