Skip to content

Importmaps with TailwindCSS + additional CSS packages? #159

@Mar1cX

Description

@Mar1cX

Hi,
As I'm currently looking into importmaps approach, how it handles js, and the handy rails 7 approach with tailwindcss-rails I've come to various blogs and documentation of how the other packages should be handled. JS part with importmaps is clear, confusion comes with the CSS part.

It seems that many ppl suggest combining ESBuild or CSSBuild to compile css packages, but it feels misleading. Another approach is to just use CSS CDN of the package, but that is the approach many tried to avoid when using compilers. In this package, it was mentioned that packages would be added to the application.tailwinds.css file.

Importing css package there wouldn't be an issue, but how do we properly use this package to get css on our projects so that we can do the import? Most likely I'm missing something but due to multiple sources and different approaches now it makes it difficult to follow up as I want to give importmaps and tailwindcss a try.

Maybe an example of such a case would be great as well, good examples are packages like: flatpickr, flowbite, daisyui, etc.
Thanks in the advance for the response.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions