Skip to content

Bundle manually written declaration files #229

@decanTyme

Description

@decanTyme

Question

Sorry If this was already answered somewhere, but I couldn't find it, nor do I know what to really search for so I'm posting here.

I basically have a manually written declaration file (.d.ts) that I want to be bundled too (or merged with a specific output file if possible). This declaration file contains types for a virtual module to be used with Vite (i.e. declare module "virtual:my-plugin") so users of my plugin won't see a type error when they import it and will have the correct types. Is it possible with this plugin?

I have tried everything that I know of, including a triple-slash directive pointing to the file but that gets stripped out in the final bundle as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions