Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: prevent extraneous tsconfig errors in tests (#38718)

Charis425d9ca592cc
diff --git a/apps/docs/vitest.config.ts b/apps/docs/vitest.config.ts
index bbadb9591ec..25dac66db18 100644
--- a/apps/docs/vitest.config.ts
+++ b/apps/docs/vitest.config.ts
@@ -1,10 +1,19 @@
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'],
},
- plugins: [tsconfigPaths({ root: import.meta.dirname })],
+ // 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'],
+ }),
+ ],
})