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

vite.config.ts

33 lines845 Bytes

1import { svelte } from '@sveltejs/vite-plugin-svelte'
2import { defineConfig } from 'vitest/config'
3import { svelteTesting } from '@testing-library/svelte/vite'
4​
5import packageJson from './package.json'
6​
7export default defineConfig({
8 plugins: [svelte(), svelteTesting()],
9 // fix from https://github.com/vitest-dev/vitest/issues/6992#issuecomment-2509408660
10 resolve: {
11 conditions: ['@tanstack/custom-condition'],
12 },
13 environments: {
14 ssr: {
15 resolve: {
16 conditions: ['@tanstack/custom-condition'],
17 },
18 },
19 },
20 test: {
21 name: packageJson.name,
22 dir: './tests',
23 watch: false,
24 environment: 'jsdom',
25 setupFiles: ['./tests/test-setup.ts'],
26 coverage: {
27 enabled: !!process.env.CI,
28 provider: 'istanbul',
29 include: ['src/**/*'],
30 },
31 typecheck: { enabled: true },
32 },
33})