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

vite.config.ts

38 lines856 Bytes

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