Skip to content

Bundle includes more than it should when using main #63

@JonWallsten

Description

@JonWallsten

I'm using the latest dts-bundle to combine the d.ts files generated by typescript compiler.
When setting main to my index.d.ts file I expect the output in the bundle to match what's actually exported in my index.ts file. It seems however that it treats all exports as a wildcard.
So this:
export { destruct } from 'module'
in practice becomes this
export * from 'modules'

Which is unfortunately really bad since my IDE now thinks certain things are exported, based on the d.ts file, when they are not, which leads to false positives in the type checker. And you wont notice until you get weird runtime errors. I don't know if this is intended or a limitation/bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions