Mastering Packs in Webpacker

In the previous article, we saw what Webpacker is and how Rails 6 has integrated it. In this article, we will understand how to use the packs.A new Rails 6 app creates following files under app/javascript, the new destination for writing our JavaScript code.Projects/scratch/better_hn…

Understanding Webpacker in Rails 6

Starting with Rails 6, Webpacker is the default JavaScript compiler. It means that all the JavaScript code will be handled by Webpacker instead of the old assets pipeline aka Sprockets. Webpacker is different from asset pipeline in terms of philosophy as well as implementation. In this blog post, we will…