Using Webpacker

Let's take Webpacker for a spin and build something in this lesson.

Setting Webpacker up

To follow along, you don’t need to install Webpacker but do look at this lesson to get an understanding of the file structure.

First, we want to make sure that everything is working. To connect the Webpacker build to our app, we need to add two javascript_pack_tag calls to the app/views/layouts/application.html.erb file, as follows:

Get hands-on with 1200+ tech skills courses.