Commit 9328c75e authored by Mike Greiling's avatar Mike Greiling

remove force_same_domain option from webpack helpers

parent 4bdfcc58
require 'gitlab/webpack/manifest' require 'gitlab/webpack/manifest'
module WebpackHelper module WebpackHelper
def webpack_bundle_tag(bundle, force_same_domain: false) def webpack_bundle_tag(bundle)
javascript_include_tag(*entrypoint_paths(bundle, force_same_domain: force_same_domain)) javascript_include_tag(*entrypoint_paths(bundle))
end end
def webpack_controller_bundle_tags def webpack_controller_bundle_tags
...@@ -33,7 +33,7 @@ module WebpackHelper ...@@ -33,7 +33,7 @@ module WebpackHelper
javascript_include_tag(*chunks) javascript_include_tag(*chunks)
end end
def entrypoint_paths(source, extension: nil, force_same_domain: false) def entrypoint_paths(source, extension: nil)
return "" unless source.present? return "" unless source.present?
paths = Gitlab::Webpack::Manifest.entrypoint_paths(source) paths = Gitlab::Webpack::Manifest.entrypoint_paths(source)
...@@ -41,11 +41,9 @@ module WebpackHelper ...@@ -41,11 +41,9 @@ module WebpackHelper
paths.select! { |p| p.ends_with? ".#{extension}" } paths.select! { |p| p.ends_with? ".#{extension}" }
end end
unless force_same_domain force_host = webpack_public_host
force_host = webpack_public_host if force_host
if force_host paths.map! { |p| "#{force_host}#{p}" }
paths.map! { |p| "#{force_host}#{p}" }
end
end end
paths paths
......
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