September 2022
Intermediate to advanced
410 pages
10h 7m
English
Before I get to the Hotwire version of the React page, I first swapped out jsbundling-rails and cssbundling-rails for importmaps-rails and the tailwindcss-rails gems. This was a little bit more straightforward than I expected, especially because the app is small, and I didn’t need to bring in React (since this version of the app will replace it).
Here’s what I did:
I removed cssbundling-rails and jsbundling-rails from the Gemfile and added importmaps-rails and tailwindcss-rails.
I removed the js: and css: lines from the Procfile.
I removed the files from the app/assets/builds directory; those will interfere with the import map if present and will lead to some very hard to find bugs because the code you are writing isn’t the code ...