I have a .Net Core API project that includes an Angular version 7 project, so I do not want to change the index.html source code each time manually,
index.html
<base href="/">
manually each time when I build development version (VS -> href ="/" -> IIS Express ) then build production version by Visual Studio publish (VS-> href="/ProjectName/" -> Right-Click On Project -> Publish...), I believe it does not make sense!
N.B. As I publish and build angular project by VS publish feature I don't access to this commands,
ng build --prod --base-href /ProjectName/
or any different type of this command
I am looking for a solution to handle this issue by configuration or something like this.
Thanks a lot!
Add it to package.json for build script "build":
ng build --prod --aot --base-href /ProjectName/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With