Closed jarodtaylor closed 1 month ago
Thanks for the report!
I'll look into the two application.html.erb
warnings that you mentioned. Good catch.
Was the CSS framework question not asked because I changed from sprockets to Vite?
Yes, when picking Vite, the traditional asset pipeline questions (CSS, JS) are skipped. Vite is a more Node-centric ecosystem, so if you want to install Tailwind, you'd probably follow setup instructions for Vite + Tailwind, as opposed to how Rails typically does it.
I have not used Tailwind much at all, so I'm honestly not sure how a Rails + Vite + Tailwind setup should ideally be handled. Therefore I didn't include a prescription for this in nextgen
.
My guess would be to follow the instructions here: https://tailwindcss.com/docs/guides/vite. Except where it says src/index.css
, use app/frontend/entrypoints/application.css
.
This article also seems to follow that approach: https://dev.to/edvardasbaravykas/ruby-on-rails-boilerplate-vite-tailwind-stimulus-28kk
Makes sense! I got it all figured out. Wasn't much of a hassle.
Just added the tailwind deps/configs and did exactly what was mentioned in the resources you sent above (added the application.css entrypoint, etc)
It's all good and works beautifully.
Thank you!
FYI the apple-mobile-web-app-capable
tag is provided by Rails itself, not nextgen. It will be fixed in Rails 8.0: https://github.com/rails/rails/pull/52738
First of all, I loved this! I'm not a Rails dev and I tried starting a new Rails app (7.2) using Vite and had issues getting it to work (even following the docs on vite-ruby).
So, this thing was awesome! Thank you!
Just a couple of things:
yarn add tailwind
?bin/dev
) and viewed localhost:3000 I had a couple browser console errors/warnings:<%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
) included so I had to remove it.<meta name="apple-mobile-web-app-capable" content="yes">
being deprecated and to use<meta name="mobile-web-app-capable" content="yes">
instead.Neither of those application.html.erb issues were a big deal, but just more of a heads up.
Was the CSS framework question not asked because I changed from sprockets to Vite?