You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The construct above should be enough for tsdown to generate types.
What is actually happening?
Types are not generated, since it only looks for types or typings at the top level.
Any additional comments?
One subtlety: if the "." entry contains a "types" field, but the "require" entry does not contain a "types" field, the types should be generated for one module but not the other. Tricky tricky.
Please reopen. The linked comment and related issues and pull requests discuss the export map while this one is about generation of the actual type definition files.
See this StackBlitz; run npm run build and see that type definitions are not generated even though type entry points are specified.
Note also that running npx tsdown --dts --exports causes a panic:
Rolldown panicked. This is a bug in Rolldown, not your code.
thread '<unnamed>' (3) panicked at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/napi-3.8.3/src/tokio_runtime.rs:113:6:
Access tokio runtime failed in spawn
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Please report this issue at: https://github.com/rolldown/rolldown/issues/new?template=panic_report.yml
Activity
fix(types): Add missing type definitions to bundle
sxzz commentedon Apr 2, 2026
#875 (comment)
dmurvihill commentedon Apr 2, 2026
Please reopen. The linked comment and related issues and pull requests discuss the export map while this one is about generation of the actual type definition files.
See this StackBlitz; run
npm run buildand see that type definitions are not generated even though type entry points are specified.Note also that running
npx tsdown --dts --exportscauses a panic:fix(exports): detect types fields nested in conditional exports