Package version: @supabase/ssr@0.9.0
File: node_modules/@supabase/ssr/tsconfig.json
What's happening
The published tsconfig sets outDir: "dist/module" but does not set rootDir. When a consumer's IDE (VS Code, Cursor) validates this file as part of TypeScript's project model, it surfaces this warning on the line that references the source layout:
The common source directory of 'tsconfig.json' is './src'. The 'rootDir' setting must be explicitly set to this or another path to adjust your output's file layout.
Visit https://aka.ms/ts6 for migration information.
The relevant section of tsconfig.json:
{
"include": ["src/**/*"],
"compilerOptions": {
"module": "preserve",
"outDir": "dist/module",
"sourceMap": true,
"declaration": true
// ...
}
}
Why it matters
It does NOT break consumers' builds — the dist/ shipped in the npm tarball is fine. But:
- Every consumer who opens the
node_modules/ folder (intentionally or via a code-search) sees a red squiggle on their IDE for a vendor tsconfig they cannot fix.
- The TypeScript emit semantics for
outDir without an explicit rootDir are about to change (per the TS6059 migration guidance). Best to lock it in now while the dist is unaffected.
Suggested fix
Add "rootDir": "./src" next to outDir:
{
"include": ["src/**/*"],
"compilerOptions": {
"module": "preserve",
"outDir": "dist/module",
"rootDir": "./src",
// ...
}
}
That's the migration the TS team recommends, and it makes the published config IDE-quiet.
Reproduction
- Fresh consumer project on TypeScript ^5.8 (or any version that emits TS6059 hints).
npm install @supabase/ssr@0.9.0.
- Open
node_modules/@supabase/ssr/tsconfig.json in VS Code / Cursor.
- Hover over the
compilerOptions block — the warning appears.
Thanks for the great library.
Package version:
@supabase/ssr@0.9.0File:
node_modules/@supabase/ssr/tsconfig.jsonWhat's happening
The published tsconfig sets
outDir: "dist/module"but does not setrootDir. When a consumer's IDE (VS Code, Cursor) validates this file as part of TypeScript's project model, it surfaces this warning on the line that references the source layout:The relevant section of
tsconfig.json:{ "include": ["src/**/*"], "compilerOptions": { "module": "preserve", "outDir": "dist/module", "sourceMap": true, "declaration": true // ... } }Why it matters
It does NOT break consumers' builds — the
dist/shipped in the npm tarball is fine. But:node_modules/folder (intentionally or via a code-search) sees a red squiggle on their IDE for a vendor tsconfig they cannot fix.outDirwithout an explicitrootDirare about to change (per the TS6059 migration guidance). Best to lock it in now while the dist is unaffected.Suggested fix
Add
"rootDir": "./src"next tooutDir:{ "include": ["src/**/*"], "compilerOptions": { "module": "preserve", "outDir": "dist/module", "rootDir": "./src", // ... } }That's the migration the TS team recommends, and it makes the published config IDE-quiet.
Reproduction
npm install @supabase/ssr@0.9.0.node_modules/@supabase/ssr/tsconfig.jsonin VS Code / Cursor.compilerOptionsblock — the warning appears.Thanks for the great library.