I love that Rails 7 eliminates the node dependency. It’s a huge simplification! However, after getting my project up and running with just tailwindcss-rails I want to add a tailwind component library to save me time.
I looked at Daisy UI and Flowbite, two popular ones, but I can’t get either of them to work by following their directions. I might not be fully understanding how importmap and tailwind plugins work.
Is it correct that no tailwind plugins are supported by tailwindcss-rails besides the ~4 plugins made by tailwind itself? That seems to be the case. With Daisy UI, for example, I could only get this working by directly linking to the full minified CSS on a CDN within my application template, but that’s a 2 MB file. I won’t get any of the tree shaking that tailwind provides?
In the case of Flowbite, I think this requires the same full minified CSS, link but it appears I can at least install the javascript component using importmap? Notably, Daisy UI doesn’t require any javascript inclusion.
This was the best I could do to get both of these libraries working, as I’ve been trying them out. But I feel like I’m missing something. Is there a better way to incorporate a Tailwind UI library in an efficient manner without resorting to jsbundling-rails and going down the whole node path again?