fix(service-worker): detect new version even if files are identical to an old one (#26006)
Previously, if an app version contained the same files as an older version (e.g. making a change, then rolling it back), the SW would not detect it as the latest version (and update clients). This commit fixes it by adding a `timestamp` field in `ngsw.json`, which makes each build unique (with sufficiently high probability). Fixes #24338 PR Close #26006
This commit is contained in:

committed by
Andrew Kushnir

parent
5fded9fcc8
commit
586234bb01
@ -32,6 +32,7 @@ export class Generator {
|
||||
|
||||
return {
|
||||
configVersion: 1,
|
||||
timestamp: Date.now(),
|
||||
appData: config.appData,
|
||||
index: joinUrls(this.baseHref, config.index), assetGroups,
|
||||
dataGroups: this.processDataGroups(config),
|
||||
|
Reference in New Issue
Block a user