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-cli/',
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', './src/storage/index.ts'],
34 srcDir: './src',
35 cjs: false,
36 }),
37)