import react from '@vitejs/plugin-react'; import { loadEnv } from 'vite'; import { defineConfig } from 'vitest/config'; export default defineConfig({ plugins: [react()], resolve: { tsconfigPaths: true }, test: { globals: true, include: ['src/**/*.test.{js,jsx,ts,tsx}'], environment: 'jsdom', setupFiles: ['./vitest-setup.ts'], env: loadEnv('', process.cwd(), ''), coverage: { include: ['src/**/*'], exclude: ['src/**/*.stories.{js,jsx,ts,tsx}', '**/*.d.ts'], }, }, });