baseHref does not work
dimitriy-k opened this issue · 4 comments
dist/myapp/index.html:
<base href="/my/app/here/">
command:
npx angular-http-server -p 9001 --path dist/myapp --baseHref '/my/app/here/'
it cannot resolve all .js files, so it returns index.html for each request:
Route dummy, replacing with index.html
ok, looked in your code, baseHref should be without first /, so --baseHref 'my/app/here/', then it works
Is there an issue here, or can we close?
if you know that for this lib baseHref should be used without first / then there is no issue. But normally nobody will know it. So, you can put it in documentation, or better update your code to check when / is needed to add it, so both cases will be valid: --baseHref 'my/app/here/' and --baseHref '/my/app/here/'
Would you like to convert your learnings into a contribution to the README?