-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tailwind.css file is not being updated in Rails 8 with tailwindcss-ruby 4.0.0.alpha27 #419
Comments
Thanks for opening this issue. I haven't tried using the new alpha releases yet, but I'll take a look as soon as I can. |
Ah! Tailwindcss 4 is trying to be much smarter about detecting files, but it looks like if the Should be a pretty easy thing to fix ... I will create a draft branch and maybe you can try it out and let me know if it works. |
which doesn't need a config file or an input file anymore. Closes #419
@pinzonjulian Can you try out the branch from #420 and let me know what you think? |
Responding to your comments on #420 ...
I'm not sure how anything can regress from "file doesn't get generated" 🤣, but I understand that it's not working for your use case. In #420 I removed the I added some tests in #420 that ensure CSS is generated appropriately for scaffolds (in the user journey test). Can you suggest an assertion we can add there that would be meaningful for your use case? Are you able to figure out a command line (not relying on this gem) that would accomplish what you want with the v4 alpha CLI? (You can run |
OK, I'm digging back into your report and ... I misunderstood, and my local testing was still using v3 syntax in the It sounds like you're saying that the CSS was being generated correctly, but that "watch" isn't updating? I've confirmed that I see that behavior locally, too. Can I ask you to report this upstream? You can use the In the meantime, I'll revert the change that broke handling of |
See #423 which includes proper testing for v4 |
Interestingly, if I put something like this in my @import "tailwindcss";
body {
background: #00aa00;
} and I change the background color, then everything works fine for me when I |
@pinzonjulian I've merged #423 which should fix the regression from #420. At this point, I think the issue you're describing is from the upstream |
Thanks for that @flavorjones ! I've tested the reverted changes and it's working back to where it was. I do agree that there's something going on with the What do you think about adding a test for the watch command in the integration test as well? |
You were spot on with your assessment @flavorjones. I tried the standalone CLI without Rails and indeed the |
We haven't needed to until now; and I'm not sure adding complexity to the user journey test would be worth the effort. If you want to give it a try and can make it work reliably, I'd be happy to merge it, though! I don't think there's anything else this project can do at this point, so I'm going to close this issue. But I'm happy to continue the conversation. |
Whenever I update the
app/assets/stylesheets/application.tailwind.css
file, the corresponding output file atapp/assets/builds/tailwind.css
does not update.The process seems to be doing something:
But the changes are not being picked up. Notice the execution time on the watcher vs the updated timestamps on the file:
The only way to get this to work is to delete the file, stop the watcher (i.e.
bin/dev
in a rails app) and run the watcher again.I created an app to try out the new setup and experiment on Tailwind v4. The only notable thing about it is that I removed the
tailwind.config.js
file since it's not supposed to be needed in Tailwind v4. I tried adding it back and that did not resolve the issue.https://github.com/pinzonjulian/tw4-experiments
Gem versions
tailwindcss-rails (3.0.0)
tailwindcss-ruby (4.0.0.alpha.27)
rails (8.0.0.beta1)
Running on macOS Sonoma 14.6.1
The text was updated successfully, but these errors were encountered: