5

When we create build for production then we use a command as -

ng build --aot --output-hashing=all --prod --base-href "/xyz/" --deploy-url "/xyz/"

What is use of --output-hashing=all?

Sunil Garg
  • 12,670
  • 19
  • 110
  • 153
Praveen Barawal
  • 51
  • 1
  • 1
  • 4
  • In the Angular documentation https://angular.io/cli/build you can see what each option is doing. – Achilles Moraites Sep 12 '20 at 05:46
  • the explanation to your question can be obtained in another question : https://stackoverflow.com/questions/55402751/angular-app-has-to-clear-cache-after-new-deployment/55403095#55403095 – Joel Joseph Oct 26 '21 at 07:58

1 Answers1

8

From Angular Documentation:

Define the output filename cache-busting hashing mode.

So, if your parameter is all, your generated files would look like:

main.62beb1fb93041eb44194.js
Asaf
  • 1,218
  • 7
  • 15