require 'webpacker/source'

module Webpacker::Helper
  def javascript_pack_tag(name, **options)
    tag.script src: Webpacker::Source.new(name).path, **options
  end
end

require 'webpacker/source'

module Webpacker::Helper
  def javascript_pack_tag(name, **options)
    tag('script', src: Webpacker::Source.new(name).path, **options)
  end
end

Use old fashioned tag code
Use old fashioned tag code

The new `tag.script` code is not available on `5-0-stable`; it is onl
available on Rails master, which is tracking 5.1.

Discovered this while trying to write a test for this helper method. :)
