Issue
Angular is generating random names for the files when running ng build --prod
. Is there a way to specify the names we want? We are using angular-cli
. We really need this as our angular application is embedded inside a CMS platform.
Solution
If you build in dev mode, files will get the standard names like inline.bundle.js, vendor.bundle.js, main.bundle.js, etc. To build in production mode, use the --prod
flag:
ng build --prod
You can use the following flags to prevent file name hashing in production mode:
ng build --prod --output-hashing none
Read more about "build" and its command line options on the Angular docs site.
Answered By - Mauricio De La Quintana
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.