Skip to content

Types do not exist in the published bundle #225

@simeon-raykov

Description

@simeon-raykov

Hey folks,

I noticed that when installing the library using yarn, the .d.ts files are not included—specifically, I'm missing the types for DesignTokenDocBlock, which I need for a wrapper component that I use.

A workaround would be to create custom types, but ideally, we should fix the types in the library itself. I cloned the repo, ran yarn build, and confirmed that all the .d.ts files (including doc-blocks.d.ts) are correctly generated in the dist folder. However, when I install the library locally, only preset.d.ts appears in the bundle.

It seems like there might be an issue with the publishing process. My guess is that we need to include src/doc-blocks.ts and other relevant files in the tsup.node.config. (I haven’t worked with tsup before, so forgive my limited knowledge here.)

In our monorepo setup, we use Vite along with the DTS plugin to handle bundling and type generation.

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