Skip to Content
Modern Front-End Development for Rails
book

Modern Front-End Development for Rails

by Noel Rappin
June 2021
Intermediate to advanced
398 pages
9h 35m
English
Pragmatic Bookshelf
Content preview from Modern Front-End Development for Rails

Configuring Webpacker

A Rails 6.1 app installs Webpacker as part of the default app creation; however, you need to make some configuration changes up front to install Hotwire, and make sure that CSS and TypeScript are properly integrated.

Webpacker is a Rails gem, so the default install puts it into your Gemfile:

 gem "webpacker"

As I write this, Webpacker 6.0 is in beta. This book uses Beta 6—hopefully it will be released by the time you read this.

Webpacker creates a number of local configuration files, including the package.json manifest of JavaScript libraries to use, and then retrieves those JavaScript libraries using the Yarn package manager.[24]

The default installation of Webpacker does not integrate with TypeScript or with CSS libraries. ...

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, 2nd Edition

Modern Front-End Development for Rails, 2nd Edition

Noel Rappin
Agile Web Development with Rails 6

Agile Web Development with Rails 6

Sam Ruby, David B. Copeland, Dave Thomas

Publisher Resources

ISBN: 9781680508758Errata Page