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