This week I learnt, the hard way, about this.

If you’ve got a Rails 7 stack with tailwindcss-rails purring away, you may be suddently affronted by finding it no longer watching your file changes and regenerating the assets for you.

This conicided with my own issues debugging Stimulus config with importmaps. I had done some rake assets:precompile runs to try and inspect the built assets.

As the link to DHH’s comment above shows, if precompiled assets exist, they will be used by Rails instead of the assets being generated via the bin/rails tailwindcss:watch command (in dev, too).

The fix? rake assets:clobber and restart the Tailwind watcher and Rails server and you should be good to go.