Skip to content

Potential side effect imports preserved in ESM .d.ts #391

@SuperchupuDev

Description

@SuperchupuDev

Reproduction link or steps

https://github.com/SuperchupuDev/tsdown-repro/tree/dts-import

What is expected?

Useless imports not being in the .d.ts file, just like .d.cts

What is actually happening?

They are preserved

Any additional comments?

I'm guessing it's probably caused by the fix for #273.

picomatch sets "sideEffects": false on its package.json, so it's not right for tsdown to detect it as a module that potentially produces side effects 🤔 but that's a separate issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions