Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

vite.config.ts

24 lines589 Bytes

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 { UserConfig } from 'vitest/config'
6​
7const config = defineConfig({
8 plugins: [react()] as UserConfig['plugins'],
9 test: {
10 name: packageJson.name,
11 dir: './tests',
12 watch: false,
13 environment: 'jsdom',
14 typecheck: { enabled: true },
15 },
16})
17​
18export default mergeConfig(
19 config,
20 tanstackViteConfig({
21 entry: './src/index.ts',
22 srcDir: './src',
23 }),