Modern Front-End Development for Rails B7: pg 71 javascript_packs_tag

We’re going to add it to the layout file app/layouts/application.html.erb by adding <%= javascript_packs_tag(“venue_display”) %> to the header right below the other pack calls.

It looks like this should be:

    <%= javascript_packs_with_chunks_tag(
          'venue_display',
          'data-turbolinks-track': 'reload') %>

Depends on what beta version of Webpacker you are using – I think we included a note in the changes at the front to that effect.

I also just sent this out to reviewers, it’ll help.

As Noel has been reviewing the book’s code, he’s realized that there are some breaking changes in different beta versions of Webpacker, and also that it’s easier than he thought to wind up with the wrong version. If you are trying to follow along with the code in the book, please keep in mind the following.

Each individual directory in the book’s downloaded code should work as is, but if you are trying to keep up with the code yourself, you should use Webpacker version 6.0.0.beta.5 – beta 6 has a big breaking change that is not reflected in the book text yet.

However, please note that because of an issue in how the Webpacker team has released betas, if you specify the version in your Gemfile, you must use the exact version, and not use the ~> syntax. If you use ~> you’ll get an earlier, incorrect version (specifically, you’ll get 6.0.0.pre.2, which is older).

This should all be cleared up by the time the book is released for good, but we thought it might help you as you review the book.

“”

I see. Shouldn’t it be javascript_pack_tag (no s in packs) then?

Yeah, that’s just a typo. Thanks!