Commit d6cd6e9d authored by Mike Greiling's avatar Mike Greiling

add webpack_ prefix to entrypoint paths helper

parent b5983a70
...@@ -2,7 +2,7 @@ require 'gitlab/webpack/manifest' ...@@ -2,7 +2,7 @@ require 'gitlab/webpack/manifest'
module WebpackHelper module WebpackHelper
def webpack_bundle_tag(bundle) def webpack_bundle_tag(bundle)
javascript_include_tag(*entrypoint_paths(bundle)) javascript_include_tag(*webpack_entrypoint_paths(bundle))
end end
def webpack_controller_bundle_tags def webpack_controller_bundle_tags
...@@ -19,7 +19,7 @@ module WebpackHelper ...@@ -19,7 +19,7 @@ module WebpackHelper
until chunks.any? || route.empty? until chunks.any? || route.empty?
entrypoint = "pages.#{route.join('.')}" entrypoint = "pages.#{route.join('.')}"
begin begin
chunks = entrypoint_paths(entrypoint, extension: 'js') chunks = webpack_entrypoint_paths(entrypoint, extension: 'js')
rescue Gitlab::Webpack::Manifest::AssetMissingError rescue Gitlab::Webpack::Manifest::AssetMissingError
# no bundle exists for this path # no bundle exists for this path
end end
...@@ -27,13 +27,13 @@ module WebpackHelper ...@@ -27,13 +27,13 @@ module WebpackHelper
end end
if chunks.empty? if chunks.empty?
chunks = entrypoint_paths("default", extension: 'js') chunks = webpack_entrypoint_paths("default", extension: 'js')
end end
javascript_include_tag(*chunks) javascript_include_tag(*chunks)
end end
def entrypoint_paths(source, extension: nil, exclude_duplicates: true) def webpack_entrypoint_paths(source, extension: nil, exclude_duplicates: true)
return "" unless source.present? return "" unless source.present?
paths = Gitlab::Webpack::Manifest.entrypoint_paths(source) paths = Gitlab::Webpack::Manifest.entrypoint_paths(source)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment