Open History to see the last commit
1import { svelte, vitePreprocess } 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: [
9 svelte({
10 preprocess: vitePreprocess(),
11 compilerOptions: {
12 runes: true,
13 },
14 }),
15 svelteTesting(),
16 ],
17 // fix from https://github.com/vitest-dev/vitest/issues/6992#issuecomment-2509408660
18 resolve: {
19 conditions: ['@tanstack/custom-condition'],
20 },
21 environments: {
22 ssr: {
23 resolve: {
24 conditions: ['@tanstack/custom-condition'],
25 },
26 },
27 },
28 test: {
29 name: packageJson.name,
30 dir: './tests',
31 watch: false,
32 environment: 'jsdom',
33 setupFiles: ['./tests/test-setup.ts'],
34 coverage: {
35 enabled: !!process.env.CI,
36 provider: 'istanbul',
37 include: ['src/**/*'],
38 },
39 typecheck: { enabled: true },
40 restoreMocks: true,
41 },
42})