Files
supabase/apps/docs/vitest.config.ts
Charis 425d9ca592 chore: prevent extraneous tsconfig errors in tests (#38718)
Tests get spammed with unnecessary tsconfig errors because the Vitest
config tries to use tsconfig files from the examples directory.
Excluding those from tsConfigPaths for cleaner test output.
2025-09-16 13:22:00 -04:00

20 lines
610 B
TypeScript

import tsconfigPaths from 'vite-tsconfig-paths'
import { defineConfig } from 'vitest/config'
// eslint-disable-next-line no-restricted-exports
export default defineConfig({
test: {
// Exclude examples from test discovery (does not affect tsconfig scanning)
exclude: ['examples/**/*', '**/node_modules/**'],
setupFiles: ['vitest.setup.ts'],
},
// Restrict tsconfig-paths to only use this app's tsconfig
plugins: [
tsconfigPaths({
root: import.meta.dirname,
// Prevent scanning tsconfig files in subfolders like examples/**
projects: ['tsconfig.json'],
}),
],
})