Home:ALL Converter>Angular build with output cashing flag generates the same hash

Angular build with output cashing flag generates the same hash

Ask Time:2019-01-25T00:28:21         Author:Uentee

Json Formatter

I have an angular application (angular 6, angular-cli 6.1), when I run a build with the outputHashing flag set to 'all' it always generates files that have the same hash value (chunks, styles, vendor, main and polyfills all get generated with the same hash as they had before, even if they were edited)

This causes a problem when deploying updated versions of the application: the clients will not see the newer version unless they clean their local cache, since the distributed files have the same hash number and won't be downloaded as new files.

On what basis is the hash generated?

And how to force it to create a new value on every build?

Author:Uentee,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/54351256/angular-build-with-output-cashing-flag-generates-the-same-hash
yy