Open History to see the last commit
1import { defineConfig, mergeConfig } from 'vitest/config'
2import { tanstackViteConfig } from '@tanstack/vite-config'
3import packageJson from './package.json'
4
5const config = defineConfig({
6 test: {
7 name: packageJson.name,
8 dir: './',
9 watch: false,
10
11 globals: true,
12 environment: 'node',
13 include: ['tests/**/*.test.ts'],
14 coverage: {
15 provider: 'v8',
16 reporter: ['text', 'json', 'html', 'lcov'],
17 exclude: [
18 'node_modules/',
19 'dist/',
20 'tests/',
21 '**/*.test.ts',
22 '**/*.config.ts',
23 '**/types.ts',
24 ],
25 include: ['src/**/*.ts'],
26 },
27 },
28})
29
30export default mergeConfig(
31 config,
32 tanstackViteConfig({
33 entry: ['./src/index.ts'],
34 srcDir: './src',
35 cjs: false,
36 }),
37)