I'm working on a Rails 7 project where I use ViewComponents and Tailwindcss. I'm having some problem getting changes in component's .html.erb
files to update properly.
When I run ./bin/dev
and make css-changes or additions inside app/components/<module-name>/<file-name.html.erb
the added css class doesn't get compiled / rendered.
If I would add the same class in any of my app/views
html.erb
the correct styling is applied.
I have tried to update config/tailwind.config.js
to include:
content: [
...
'./app/views/**/*',
'./app/components/**/*'
But every time I re-run .bin/dev
the css-classes that only exists inside app/components
won't show.
Any ideas on how I can fix this?