Search code examples
ruby-on-railswebpacker

How to get absolute url to javascript asset pack with webpacker gem, Rails 5.1 rc1


I need to get the absolute url a javascript pack and I'm having trouble finding a method in which to do it in the source.


Solution

  • This appears to be working for me

    <%= url_to_asset(Webpacker::Manifest.lookup("app.js")) %>