I am facing a cache issue in my angular app production build, I have tried building with
ng build --prod --outputHashing=all
That didn't work and I have added
location / {
root /distlocation;
index index.html index.htm;
try_files $uri $uri/ /index.html;
add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate';
}
on nginx.
Even in index.html I have added
<head>
<meta charset="utf-8" />
<meta http-equiv="Cache-Control" content="max-age=0, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
</head>
Even after doing all this application is not fetching latest files. Files are loaded from service-worker. If I do force reload latest changes are reflecting.