Add Tailwind to a Solidus store #4731
-
Hello everyone! I have been trying to add Tailwind to a Solidus store with no luck. Adding Tailwind the usual way you would do on any Rails app does not work, as Tailwind components do not display properly. Unfortunately, I haven't found any guide on how to achieve this. Basically, I would like to apply changes to Solidus' Starter Frontend using Tailwind. Steps
I have checked this repository (found on this GitHub issue) and compared it with my own code and I cannot find any difference with mine. Do you have any idea on how to achieve this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello! I have a Solidus store running with Tailwind. Here's the step I followed to make it work:
In - <%= stylesheet_link_tag 'solidus_starter_frontend', media: 'screen' %>
+ <%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %> Now start rails with: bin/dev At this point you should be able to add tailwind classes to your HTML; all changes to related files will trigger a recompile, and a page reload in the browser automatically. |
Beta Was this translation helpful? Give feedback.
Hello!
I have a Solidus store running with Tailwind. Here's the step I followed to make it work:
In
layout/storefront.html.erb
:Now start rails with:
At this point you should be able to add tailwind classes to your HTML; all changes to related files will trigger a recompile, and a page …