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