I have an Angular 4.4.6 application and I build this using Angular CLI 1.0.1.
The problem I have is, apart from inline.bundle.js
, main.bundle
, polyfills.bundle.js
, styles.bundle.js
, vendor.bundle.js
files names, all other File Names in "assets" and "resources" folder are NOT hashed when I build the application.
Since the file name is not hashed the request URLs for these files remain same and hence the browsers takes these files from cache it self and new changes are not reflecting.
Can somebody help how I can hash all the file names of "assets" and "resources" folders as well to avoid caching of these files ?
Build Command: ng build --prod --aot --no-sourcemap --output-hash=all
OS: Windows 10
Thanks
Simply set outputHashing to "all" in the angular.json
file
"projects": { ... }, "architect": { "build": { "builder": "@angular-devkit/build-angular:browser", "options": { ... }, "configurations": { "production": { ... "outputHashing": "all", ...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With