broccoli-asset-rev icon indicating copy to clipboard operation
broccoli-asset-rev copied to clipboard

`ember s --prod` does not update hash between rebuilds.

Open ghost opened this issue 8 years ago • 3 comments

The hash of files are not update between rebuilds when running the Ember CLI server in production mode.

Background: I'm caching the asset with a service worker. Ember CLI SRI does update the integrity hash between rebuilds, this causes the changed asset to not load.


To reproduce:

ember new test-app
cd test-app
ember s --prod

Now open localhost:4200 and note down the hash of test-app.js.

ember g component foo-bar

App reloads, note that the hash of test-app.js is still the same.

Now kill the test server and serve again with ember s --prod. Now the hash of test-app.js did change.

ghost avatar Jan 25 '17 16:01 ghost

Definitely seems possibly, there is no testing (AFAIK) around recalculating / updating. Please dig in and let us know what you find...

rwjblue avatar Jan 25 '17 17:01 rwjblue

I have also this problem on heroku deploys. With every deploy, users have to refresh the page because the fingerprinting did not change.

Exelord avatar Mar 27 '17 10:03 Exelord

We're running into issues with resource integrity as well. The current issue we're facing is the content of the css differs, but the md5 hash in the file is exactly the same:

image

This is a big issue since the initially generated file is cached long term on our CDN which means the old content is returned. This clashes with the expected integrity:

image

Edit: This happens for us on Heroku deploys (potentially the same as @Exelord), not on ember serve.

Edit 2: I've created issue #118 as this does not seem directly related to ember s --prod

melv-n avatar Jul 11 '17 09:07 melv-n