Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javascript_pack_tag seems to add path twice with asset host #320

Closed
wjdhamilton opened this issue May 3, 2017 · 3 comments
Closed

javascript_pack_tag seems to add path twice with asset host #320

wjdhamilton opened this issue May 3, 2017 · 3 comments

Comments

@wjdhamilton
Copy link

Since upgrading to 1.2 javascript_pack_tag no longer seems to render the correct url.

I am using an asset host, specified in production.rb.

In previous versions, themanifest.json file copiled for production looked something like this:

{
  "admin.js" : "/packs/admin-s089sdf098.js"
}

But now it explicitly includes the asset host path, rendering something like this:

{
  "admin.js": "jiu8a9d8f9.cloudfront.net/packs/admin-s089sdf098.js"
}

The effect of this is that the javascript_pack_tag helper renders the path twice as follows:

https://jiu8a9d8f9.cloudfront.net/javascripts/jiu8a9d8f9.cloudfront.net/packs/admin-s089sdf098.js

Which doesn't work.

Note that "javascripts" has made it into the link too, which I think is incorrect.

I have run webpacker:install as part of the upgrade process, but perhaps I have missed something else.

Any ideas would be welcome!

@wjdhamilton
Copy link
Author

I can confirm that moving back to webpacker 1.1 fixes the issue, so it looks like some kind of regression in 1.2.

Thanks very much for all you efforts in making this work btw!

@zinkkrysty
Copy link

It seems related to #224

@gauravtiwari
Copy link
Member

Yes, this need fixing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants