rollup-plugin-ts
rollup-plugin-ts copied to clipboard
Bundle manually written declaration files
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.