Package built using internal package is not bundling the internal package's type-declarations #2667
-
|
Hi Team, We currently have a mono-repo setup with three packages:
The project is built on react and typescript. Based on the bundling example here https://turbo.build/repo/docs/handbook/publishing-packages/bundling, Considering the above scenario, when I build let say Web package, its built type declarations are pointing to Common. But I would rather expect all the type-declarations of the Common package to be included in the Web, without references to Common, because Common will not published. Tool used to build: tsup |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
didn't get it. but if you are using internal packages you don't need tsup at all, otherwise if bundling external package with type declaration you need to pin it in package.json if you don't prefer cjs format change it to esm |
Beta Was this translation helpful? Give feedback.
My problem is similar to this and I solved it via this solution https://dev.to/egoist/rollup-dts-file-using-tsup-2579?signin=true