title: Configuring the index.html basehref at ng build time
body: <p>I deploy my angular app to a subfolder at the server so the URL serving the app ends up as <a href="http://www.example.com/folder-name/" rel="nofollow noreferrer">http://www.example.com/folder-name/</a> - which means the basehref has to be pointing to that folder at the index.html.</p>
  
  <p>As a result of this fact, after running the <code>ng build --prod</code>, I have to modify the generated index.html manually each and evert time so the outputted file's <code>basehref=""</code> code is edited as <code>basehref="/folder-name/'</code>. </p>
  
  <p>Is there any way to configure thru tsc config or some other tool so this is automated in a way that when I develop locally, the index.html would still continue to be <code>basehref=""</code> but when I run the <code>ng build</code> with the <code>--prod</code> flag, it comes out as <code>basehref="/folder-name/"</code>?</p>
  
  <p>Also, (this is an independent question but), is there a way to automatically FTP the contents folder to the <code>sub-folder</code> of that server? </p>
  
  <p>Thanks</p>