Repository navigation
Replies: 1 comment 2 replies
|
It's supported by default, but cjs dts is not supported. Please provide the minimal reproduction. |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
When importing a
devDependency(or a dependency specified in thedeps.alwaysBundleoption), tsdown will bundle the code of that dependency into the build output.However, if you also depend on some types provided by that dependency, e.g.
import type { example } from 'some-bundled-dep', as far as I can tell, the build will always fail if trying to generate type declaration files, e.g. the build will fail with a message like(The logged error suggests the
typemodifier is missing, but it isn’t in this case — I assume it is being stripped at some other point in the build process.)Would it be possible to have DTS generation behave like the code bundling does and bundle the required declarations in this case? I tried both with the
oxc-transformapproach usingisolatedDeclarationsand withtypescriptitself, but get the same result in both cases.All reactions