Replies: 6 comments 1 reply
-
This would be super helpful. The current runtime size of tailwind-merge puts it on par with certain css-in-js solutions. But it is essential for using Tailwind with any sort of component library like shadcn. |
Beta Was this translation helpful? Give feedback.
-
This would be nice |
Beta Was this translation helpful? Give feedback.
-
@RobinMalfait @thecrypticace looks like there's plenty of demand for this feature. |
Beta Was this translation helpful? Give feedback.
-
Having access to generated classes in some form also allows us to create a minimizers:
|
Beta Was this translation helpful? Give feedback.
-
Hi Tailwind people!
I'm the author of tailwind-merge, a library that resolves conflicts between Tailwind classes in a string. To be able to do that I rely on a large config which gets included in the client-side JS bundle and executed at runtime.
I just got a suggestion to prune the output code dynamically like Tailwind's JIT compiler does it to reduce the bundle size impact of tailwind-merge and I would love to do that. For this I'd need to know which Tailwind classes were added to the final
.css
file. My idea was to write a Tailwind plugin which gets data about all the Tailwind classes that were built and then generate code for a matching minimal tailwind-merge config.As far as I understand there is currently no API for a Tailwind plugin to understand which Tailwind classes got included in the built
.css
file and use that data for further processing. Would you be interested in building an API for that?Thanks! 😊
Beta Was this translation helpful? Give feedback.
All reactions