How to make angular-cli understand that whenever we are adding any CDN (Deployed Url) of any Styles or Scripts . It should recognize that!
So far we need to add cdn's to index.html , as adding them to .angular-cli.json has no effect!
Is there any work around?
the official CLI docs states:
these(referring to styles and scripts) will be loaded exactly as if you had added them in a tag inside index.html
so why do you want to add CDN link to your .angular-cli.json
. Adding styles and script files to the CLI config from CDN is not supported as the default behavior will fetch a local path but again no difference whatsoever in here between adding them to the index.html
and .angular-cli.json
as stated in the docs.
I was searching regarding this issue, Rather then i found issues filed in Git in the Angular-CLI,
Someone may want to read CDN Styles/ Scripts in .angular-cli.json configuration and also this deploying with libraries linked to cdn in system-config.js .
It clearly states they are not planning to implement this feature, So therefore this feature itself is not present with Angular-Cli.
Hope this helps to other queries !
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.