Open History to see the last commit
1import { defineConfig, mergeConfig } from 'vitest/config'
2import { tanstackViteConfig } from '@tanstack/vite-config'
3import react from '@vitejs/plugin-react'
4import packageJson from './package.json'
5import type { Plugin } from 'vitest/config'
6β
7const config = defineConfig({
8 plugins: [react() as any satisfies Plugin],
9 test: {
10 name: packageJson.name,
11 dir: './tests',
12 watch: false,
13 environment: 'jsdom',
14 // setupFiles: ['./tests/test-setup.ts'],
15 globals: true,
16 },
17})
18β
19export default mergeConfig(
20 config,
21 tanstackViteConfig({
22 entry: ['./src/index.ts'],
23 srcDir: './src',
24 cjs: false,
25 }),
26)