June 2021
Intermediate to advanced
398 pages
9h 35m
English
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. ...