Skip to content

named exports are renamed in d.ts #269

@ianzone

Description

@ianzone

Reproduction link or steps

  1. Go to: https://github.com/ianzone/tsdown-bug
  2. /build is generated by pnpm run build, and /dist is generated by pnpm run prod

What is expected?

named exports should not be renamed, e.g.

export { Obj }

should not be renamed as

export { Obj as Obj$1 }

But in /dist, they are renamed.

What is actually happening?

it will cause js to report missing export xxx

Image

Any additional comments?

I'm doing this PR, and I hope the rollup replacement won't cause any trouble, which means the /dist should work as /build, wish tsdown team could confirm that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstream

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions