34 lines
845 B
TypeScript
34 lines
845 B
TypeScript
import { svelte } from '@sveltejs/vite-plugin-svelte'
|
|
import { defineConfig } from 'vitest/config'
|
|
import { svelteTesting } from '@testing-library/svelte/vite'
|
|
|
|
import packageJson from './package.json'
|
|
|
|
export default defineConfig({
|
|
plugins: [svelte(), svelteTesting()],
|
|
// fix from https://github.com/vitest-dev/vitest/issues/6992#issuecomment-2509408660
|
|
resolve: {
|
|
conditions: ['@tanstack/custom-condition'],
|
|
},
|
|
environments: {
|
|
ssr: {
|
|
resolve: {
|
|
conditions: ['@tanstack/custom-condition'],
|
|
},
|
|
},
|
|
},
|
|
test: {
|
|
name: packageJson.name,
|
|
dir: './tests',
|
|
watch: false,
|
|
environment: 'jsdom',
|
|
setupFiles: ['./tests/test-setup.ts'],
|
|
coverage: {
|
|
enabled: !!process.env.CI,
|
|
provider: 'istanbul',
|
|
include: ['src/**/*'],
|
|
},
|
|
typecheck: { enabled: true },
|
|
},
|
|
})
|