import { defineConfig, mergeConfig } from 'vitest/config' import { tanstackViteConfig } from '@tanstack/vite-config' import react from '@vitejs/plugin-react' import packageJson from './package.json' import type { Plugin } from 'vitest/config' const config = defineConfig({ plugins: [react() as any satisfies Plugin], test: { name: packageJson.name, dir: './tests', watch: false, environment: 'jsdom', // setupFiles: ['./tests/test-setup.ts'], globals: true, }, }) export default mergeConfig( config, tanstackViteConfig({ entry: ['./src/index.ts'], srcDir: './src', cjs: false, }), )