Skip to Main Content
Modern Front-End Development for Rails, 2nd Edition
book

Modern Front-End Development for Rails, 2nd Edition

by Noel Rappin
September 2022
Intermediate to advanced content levelIntermediate to advanced
410 pages
10h 7m
English
Pragmatic Bookshelf
Content preview from Modern Front-End Development for Rails, 2nd Edition

Import Maps

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Modern Front-End Development for Rails

Modern Front-End Development for Rails

Noel Rappin

Publisher Resources

ISBN: 9781680509977Errata Page