-
-
Notifications
You must be signed in to change notification settings - Fork 269
Open
Description
When using tsup with TypeScript 6.x (typescript@^6.0.0), the DTS build fails with two issues:
1. Deprecated baseUrl option
error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0.
Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
Possible cause: In getRollupConfig, baseUrl is explicitly set with a fallback:
baseUrl: compilerOptions.baseUrl || ".",2. Node types not resolved
error TS2591: Cannot find name 'Buffer'. Do you need to install type definitions for node?
Try `npm i --save-dev @types/node` and then add 'node' to the types field in your tsconfig.
Possible cause: The compiler options merge:
if (options.dts) {
options.dts.compilerOptions = {
...tsconfig.data.compilerOptions || {},
...options.dts.compilerOptions || {}
};
}Workaround
{
"compilerOptions": {
"ignoreDeprecations": "6.0",
"types": ["node"]
}
}Environment
tsup: 8.xtypescript: 6.x@types/node: 22.x- Node.js: 22.x
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels