forked from TanStack/db
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
27 lines (24 loc) · 803 Bytes
/
vite.config.ts
File metadata and controls
27 lines (24 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import { defineConfig, mergeConfig } from "vitest/config"
import { tanstackViteConfig } from "@tanstack/config/vite"
import react from "@vitejs/plugin-react"
import packageJson from "./package.json"
export default defineConfig(async () => {
const tanstack = await tanstackViteConfig({
entry: `./src/index.ts`,
srcDir: `./src`,
})
// Your base config (with Vitest 'test' opts)
const base = {
plugins: [react()],
test: {
name: packageJson.name,
dir: `./tests`,
environment: `jsdom`,
setupFiles: [`./tests/test-setup.ts`],
coverage: { enabled: true, provider: `istanbul`, include: [`src/**/*`] },
typecheck: { enabled: true },
},
}
// Merge using Vite's mergeConfig (compatible with both sides)
return mergeConfig(tanstack, base)
})