module Webpack::Helpers

Constants

VERSION

Public Instance Methods

webpack_bundle_path(entry) click to toggle source
# File lib/webpack/helpers.rb, line 7
def webpack_bundle_path(entry)
  lookuped = URI.parse(Webpack.manifest.lookup(entry) || entry)
  prefix = Webpack.config.dev_server.proxy_path

  return lookuped.to_s unless lookuped.host.nil? && prefix

  Pathname.new("/#{prefix}/#{lookuped}").cleanpath.to_s
end