Angular Build Process to hash the File Name of Asset and Resource Folders

回眸只為那壹抹淺笑 提交于 2020-08-01 05:54:07

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!