Replies: 2 comments 3 replies
-
Hey! We thought about this for Tailwind V4 where the fact that you can now define those configuration values inside CSS makes it so that the plugin boundary is no longer a JavaScript module but instead you can make it a We've just recently released published the first version of the custom |
Beta Was this translation helpful? Give feedback.
-
@philipp-spiess are you familiar w/ how to implement this css-based way of specifying a node_module as content? Based on the X post you linked to, I haven't been able to get this to work. Note: I got this working with In my ui library package I have an
(hav also tried the following variations)
I'm under the impression that at this stage I should be targeting the .js files. In a consuming NextJS app, I have
In the consuming app/s
I'm successfully importing a component from the ui lib like so
Do you have any ideas of what I should try next? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Tailwind CSS is becoming more and more popular and we see a lot of public and private libraries using it. This leads to a common pattern. When a library is using Tailwind the user has to add the path of the template files to the project config like this example from the documentation illustrated:
I think it would be great if the Tailwind plugin API adds a way for plugins to do this instead of the user. My proposed idea is the following:
The implementation of
@my-company/tailwind-components/plugin
would look like this:This would only be a small improvement, but I think it makes the config cleaner and it would ensures the right paths are configured. In addition to that many libraries use the plugin API already. Has anyone else thought about such a use case? Would be happy to hear some feedback! 😊
Beta Was this translation helpful? Give feedback.
All reactions