mirror of
https://github.com/supabase/supabase.git
synced 2026-05-07 01:10:15 -04:00
425d9ca592
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.
20 lines
610 B
TypeScript
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'],
|
|
}),
|
|
],
|
|
})
|