8000 Service Worker always generates a new version hash even if source files did not change #61297
Labels
area: service-worker
Issues related to the @angular/service-worker package
Milestone
Uh oh!
There was an error while loading. Please reload this page.
Which @angular/* package(s) are the source of the bug?
service-worker
Is this a regression?
No
Description
From the Service Worker Documentation:
Assuming that the refered hash is the one included in
VersionReadyEvent.latestVersion.hash
, this is currently not the case. From my testing, each build results in a new version hash even if a) the build hash is the same and b) thehashTable
of ngsw.json is the same. (So effectively, the only thing that changes in ngsw.json is thetimestamp
property)This in turn causes SwUpdate to detect unnecessary updates with no changes.
Update:
As I suspected it is the
timestamp
in ngsw.json that is affecting the version hash. Removing the timestamp or setting it to a fixed value in the built app will result in the versioning working as documented.The text was updated successfully, but these errors were encountered: