• Angular5 Build Prod with base href

    In normally angular2 and higher version projects building for prod with following command;

    ng build --prod 

    But sometimes we need to subdomain like domainname.com/subdomainname/ , in this situation we need to use base-href command to deploy properly otherwise it won't be work without console error.

    To use base-href and define subdomain whichs is work like a directory, we just need to use following command:

    ng build --prod --base-href /subdomainname/

    with this command , we can solve this issue and deploy our project without any problem..
  • You might also like