How to add version number to CSS/JS files in angular 4?

Viewed 6148

I would like to add versioning for my angular application to avoid cache like style.css?ver=1 ? Where should I add that in angular-cli.json?

1 Answers

Use ng build --prod, it will hash your assets and modules and append the hash to the file name.

You have nothing to manage manually.

Related