Hello ! I'm writing a Vite Plugin that intercept and manipulate DOM depending on their attribute. Some framework are a bit strict regarding the attributes, so I declare the attributes in a svelte.d.ts file in the src/ directory. Here's an example :
Svelte "reads" the file wherever it is, as long as it is inside the src directory or one of its children.
Over the time, the list of attributes grew, and I want to include it inside the npm package I use to store and share the Vite Plugin.
As of now, I placed the svelte.d.ts file in the root folder of the package. But it's not working. So I modified my tsup.config.ts file in order to tell tsup to use that file. It did work, I got an index.d.ts (for my index.ts file) and a svelte.d.ts (for my svelte.d.ts)
Hello ! I'm writing a Vite Plugin that intercept and manipulate DOM depending on their attribute. Some framework are a bit strict regarding the attributes, so I declare the attributes in a svelte.d.ts file in the src/ directory. Here's an example :
Svelte "reads" the file wherever it is, as long as it is inside the src directory or one of its children. Over the time, the list of attributes grew, and I want to include it inside the npm package I use to store and share the Vite Plugin.
As of now, I placed the svelte.d.ts file in the root folder of the package. But it's not working. So I modified my tsup.config.ts file in order to tell tsup to use that file. It did work, I got an index.d.ts (for my index.ts file) and a svelte.d.ts (for my svelte.d.ts)
If you want to check it's in this repo: https://github.com/deslunes/vite-plugin-tailwind-attributify
Have a nice day!
Upvote & Fund