Closed eric-burel closed 2 years ago
tsup uses rollup-plugin-dts to bundle the dts files, which doesn't support generating declaration maps. You could run tsc
onSuccess
.
Thanks for the tip with onSuccess
. I've eventually disabled dts generation from Tsup and instead run tsc afterward: tsc --emitDeclarationOnly --declaration
.
I'll close the issue since it's a minor use case, but at least Googlers can find it if needed.
Hi,
I am able to generate
.d.ts
, however in a monorepo it's also a requirement to produce.d.ts.map
files to allow jumping between files (see https://stackoverflow.com/questions/55318663/how-to-generate-d-ts-and-d-ts-map-files-using-webpack).My tsconfig enables
declarationMap
, however it doesn't seem to be respected bytsup
. Do you have an idea of how to force this parameter to be taken into account? I guess you usetsc
under the hood so that's just a matter of passing the right config.My
tsup.config.ts
:Adding:
tsconfig: path.resolve(__dirname, "./tsconfig.build.json"),
(with the config enablingdeclarationMap
) doesn't seem to work.My
tsconfig.json
: