Issue
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!
Solution
Add it to package.json for build script "build":
ng build --prod --aot --base-href /ProjectName/
Answered By - savinn
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.