Module: Webpack::Rails::Helpers

Includes:
Helpers
Defined in:
lib/webpack/rails/helpers.rb

Constant Summary

Constants included from Helpers

Helpers::VERSION

Instance Method Summary collapse

Methods included from Helpers

#webpack_bundle_path

Instance Method Details

#image_bundle_tag(entry, **options) ⇒ Object



18
19
20
# File 'lib/webpack/rails/helpers.rb', line 18

def image_bundle_tag(entry, **options)
  image_tag webpack_bundle_path(entry), **options
end

#javascript_bundle_tag(*entries, **options) ⇒ Object



10
11
12
# File 'lib/webpack/rails/helpers.rb', line 10

def javascript_bundle_tag(*entries, **options)
  javascript_include_tag(*entries.map { |entry| webpack_bundle_path "#{entry}.js" }, **options)
end

#stylesheet_bundle_tag(*entries, **options) ⇒ Object



14
15
16
# File 'lib/webpack/rails/helpers.rb', line 14

def stylesheet_bundle_tag(*entries, **options)
  stylesheet_link_tag(*entries.map { |entry| webpack_bundle_path "#{entry}.css" }, **options)
end