Skip to content

Commit dad1635

Browse files
brilloutclaude
andauthored
fix: restore node/vite type resolution under TypeScript 7 (#1686)
TypeScript 7 no longer auto-includes @types packages the way 5.x did, and it now errors on side-effect imports (e.g. CSS) that resolve only through ambient module declarations shipped by vite/client. Declare "types" explicitly so tsc keeps finding @types/node and vite/client. Also drops the now-unused, no-longer-supported `baseUrl` compiler option (TS7 removed it) from the dashboard tsconfig. Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8de191b commit dad1635

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

packages/framework/dashboard/tsconfig.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"moduleResolution": "Bundler",
66
"lib": ["ES2022", "DOM", "DOM.Iterable"],
77
"jsx": "react-jsx",
8-
"types": ["node"],
8+
"types": ["node", "vite/client"],
99
"strict": true,
1010
"exactOptionalPropertyTypes": true,
1111
"noUncheckedIndexedAccess": true,
@@ -15,8 +15,7 @@
1515
"resolveJsonModule": true,
1616
"isolatedModules": true,
1717
"verbatimModuleSyntax": true,
18-
"allowImportingTsExtensions": true,
19-
"baseUrl": "."
18+
"allowImportingTsExtensions": true
2019
},
2120
"include": ["**/*.ts", "**/*.tsx"],
2221
"exclude": ["node_modules", "dist"]

packages/the-framework.ai/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"moduleResolution": "Bundler",
66
"lib": ["ES2022", "DOM", "DOM.Iterable"],
77
"jsx": "react-jsx",
8-
"types": ["vike-react"],
8+
"types": ["vike-react", "vite/client"],
99
"strict": true,
1010
"exactOptionalPropertyTypes": true,
1111
"noUncheckedIndexedAccess": true,

tsconfig.base.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"sourceMap": true,
1414
"experimentalDecorators": true,
1515
"emitDecoratorMetadata": true,
16-
"skipLibCheck": true
16+
"skipLibCheck": true,
17+
"types": ["node"]
1718
}
1819
}

0 commit comments

Comments
 (0)