Closed stream-toma closed 8 months ago
include ViewComponentContrib::StyleVariants
is in ApplicationComponent
Do you have the components path added in your tailwind.config.js
(content
):
const config: Config = {
content: [
'./app/components/**/*',
],
}
Maybe, you have smth like **/*.erb
or whatever not matching Ruby files.
That was correct! Added:
"./app/views/*/.{erb
,html,rb}"
and that solved it
What did you do?
What did you expect to happen?
Tailwind to include the css variables into the
builds/tailwind.css
file.What actually happened?
Was not included.
Additional context
When I included them manually in another file (i.e. in another component I used
bg-blue-500
&bg-cyan-500
) and used the variants the styles came through correctly.Not sure if there is additional setup that I have missed.
Environment
Ruby Version: Ruby 3.2
Framework Version (Rails, whatever):
Rails 7.1.2
View Component Contrib Version:
view_component-contrib 0.2.2