问题
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 "assests" 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
来源:https://stackoverflow.com/questions/50411349/angular-build-process-to-hash-the-file-name-of-asset-and-resource-folders