Harsha Kakumanu
Harsha Kakumanu

Reputation: 713

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

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?

Upvotes: 3

Views: 8133

Answers (1)

msanford
msanford

Reputation: 12247

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.

Upvotes: 11

Related Questions