Skip to content

exports.exclude doesn't work as advertised #686

@lishaduck

Description

@lishaduck

Reproduction link or steps

https://stackblitz.com/edit/github-iwpluhkh?file=tsdown.config.ts

^ This includes a "real life" example of a subpath import, but the repro gave some spurious warnings about it so I also included a more boring example as well.

What is expected?

exclude should be against the source file, as per the @example.

What is actually happening?

It's against the generated chunks, which ought to be transparent to end-users.

TBH I'd prefer them to be the exports.PATH value, but whatever is fine so long as it's not chunks.

Any additional comments?

Also watch mode is broken 🤷🏻‍♂️
I assumed it was just my machine, but it's broken in the repro.

Oh, and the stackblitz starts broken now that fixedExtension is the default.

Metadata

Metadata

Assignees

No one assigned

    Type

    Priority

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions