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 globals: true,
11 environment: 'node',
12 include: ['tests/**/*.test.ts'],
13 coverage: {
14 provider: 'v8',
15 reporter: ['text', 'json', 'html', 'lcov'],
16 exclude: [
17 'node_modules/',
18 'dist/',
19 'tests/',
20 '**/*.test.ts',
21 '**/*.config.ts',
22 '**/types.ts',
23 ],
24 include: ['src/**/*.ts'],
25 },
26 },
27})
28
29export default mergeConfig(
30 config,
31 tanstackViteConfig({
32 entry: ['./src/index.ts', './src/production.ts'],
33 srcDir: './src',
34 cjs: false,
35 }),
36)