-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
view helper not adding digest string to file name #244
Comments
@avifoxi A couple of questions first,
If you run - |
Thanks @gauravtiwari for your response! Good news - this is now working for me. The configuration change that worked for me is adding: config.x.webpacker[:digesting] = true To my
Rails 4.2.7.1, and I am running webpack alongside the asset pipeline, which I cannot deprecate. gem 'webpacker', github: 'rails/webpacker' And Gemfile.lock says I'm running webpacker v1.0.
yes
exactly as you wrote. So - I am ok to close this, as it does seem to function. |
and @seppsepp thanks for the link - the configuration line was in the comment to the issue you linked |
@avifoxi Great 👍 Yes that correct behaviour because you are using webpacker 1.1 or below. The above configuration won't be needed if you update Please note that, 1.1 has a lot of breaking changes, especially webpack config files. Please check #153 for more info. |
Feel free to close the issue if you are happy 😄 |
thanks - yes, closing! |
My
/public/packs/digests.json
looks like this:My template looks like this:
But somehow my embedded script tag in production looks like this:
This is surprising!
Why isn't the view helper appending the digest string?
In my staging environment, I am manually grabbing the digest and this is getting me off the ground. But this kind of defeats the point of having a helper:
What may be unusual about my environment:
I cannot perform the
webpacker:compile
task on my server for many reasons (not relevant for this issue, but performing the compile step on the server is off the table). What this means, for our initial webpack integration, is we are trackingpublic/packs
in git.webpacker:compile
is performed on a local machine, where it can fail safely. And all webpack js is precompiled before a deploy. Eventually webpack will do a build in an automated step, also off the main app server.And I have explicitly cleared the webpacker:compile task in production:
So I know that the webpack js + digests files exist, because they're tracked in git.
But I'm not so clear why the helper function is not appending the appropriate digest.
The text was updated successfully, but these errors were encountered: