ionic-team / ionic-team/ionicons

Loading svg fails when base-href set

Open
#707 7 comments 0 reactions 0 assignees View on GitHub
help wanted type: bug
Dominant language
TypeScript
Stars
18.2k
Forks
2.1k
PR merge metrics
No merged PRs in 30d

Description

I am using angular 7.2.2 with ionic 4.6.0.

Everything is fine until i prepare my final deployment where base-href is set to some "/context/path/". Everything keeps working except ionicon resolution, still requesting the resources from "/svg/iconname.svg".

Anything i can do beside hardcoding the src myself?

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue using Angular 7.2.2 and Ionic 4.6.0 with a base-href of /context/path/. Inspect the ionicon SVG URL resolution entry point and verify that deployment-relative requests include the configured base path rather than requesting /svg/iconname.svg; confirm that the icons load without hardcoded src values.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.