angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

ng build or ng serve alter <base href>

Open weihotline opened this issue 9 years ago • 4 comments

With the latest angular-cli update (1.0.0-beta.26 and 1.0.0-beta.30), the base href="/xyz/" in the index.html will be reverted to base href="/" if not specified in ng serve or ng build.

In my project, I explicitly set the base href="/xyz/" in the index.html. But after the project compiles (ng serve or ng build), base href will become "/" in the index.html. The issue was not present before beta.26.

weihotline avatar Feb 03 '17 20:02 weihotline

The temporary fix for me is to do ng serve --base-href /xyz/

weihotline avatar Feb 03 '17 20:02 weihotline

This has already been reported as #4340.

sgybas avatar Feb 03 '17 21:02 sgybas

Closed as this is reported in #4340

weihotline avatar Feb 03 '17 23:02 weihotline

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.