ng build base-href issue (angular cli 8)
See original GitHub issueHi,
the base-href flag works differently in angular 8. I hope you can help.
In angular 7:
ng build --prod app1 --base-href /app1/
after the command all my relative path in the scss are changed to the proper one.
source:
.example { background: url('/assets/img/picture.png') no-repeat center center; }
deployed:
.example { background: url('/app1/assets/img/picture.png') no-repeat center center; }
With angular 8 nothing happen:
source:
.example { background: url('/assets/img/picture.png') no-repeat center center; }
deployed:
.example { background: url('/assets/img/picture.png') no-repeat center center; }
Thank you!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (1 by maintainers)
Top Results From Across the Web
ng build base-href issue (angular cli 8) #14587 - GitHub
after the command all my relative path in the scss are changed to the proper one. source: .example { background: url('/assets/img/picture.png') ...
Read more >Unknown option: '--base-href' Angular 13 ng serve
im creating an angular 13app using CLI i want ...
Read more >ng build - Angular
Option Description Value Type Default Value
‑‑aot Build using Ahead of Time compilation. boolean true
‑‑base‑href Base url for the application being built. string
‑‑delete‑output‑path Delete...
Read more >base href angular - Efficient User
Create an angular application using angular CLI. The flow is we are going to generate an angular app using angular CLI. The CLI...
Read more >How to make Angular CLI built app work from a subfolder
In this article, I'll show you how to make angular build code in a way that you can just drop on any level...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I am also having the same issue.
I have similar problem