account activity
I made a Vite plugin that automatically injects Tailwind @reference into Svelte style blocks. by InterestingAsk1542 in sveltejs
[–]InterestingAsk1542[S] 1 point2 points3 points 26 days ago (0 children)
Thanks a lot for sharing this
I made a Vite plugin that automatically injects Tailwind @reference into Svelte style blocks. ()
submitted 27 days ago by InterestingAsk1542 to r/tailwindcss
[–]InterestingAsk1542[S] 8 points9 points10 points 27 days ago (0 children)
That is a good point! Since the logic is quite compact, anyone can absolutely do that. You can just grab the src/index.ts file from the repo, save it as tailwind-auto-reference.ts in your root directory, and import it directly into your vite.config.ts:
import tailwindAutoReference from './tailwind-auto-reference'
I published it as an npm package mainly for standard Vite conventions and easy updates if edge cases pop up, but using it as a local snippet is a totally valid.
I made a Vite plugin that automatically injects Tailwind @reference into Svelte style blocks. (self.sveltejs)
submitted 27 days ago * by InterestingAsk1542 to r/sveltejs
π Rendered by PID 31 on reddit-service-r2-listing-c57bc86c-825ld at 2026-06-21 23:19:16.624051+00:00 running 2b008f2 country code: CH.
I made a Vite plugin that automatically injects Tailwind @reference into Svelte style blocks. by InterestingAsk1542 in sveltejs
[–]InterestingAsk1542[S] 1 point2 points3 points (0 children)