I'm updating an old Ionic app:
The app starts when i run it locally (using ionic serve), but the SVG-icons does not show.
If I look at one particular icon, I find two versions of the icon in the source files:
The place where the icon is used looks lite this:
<ion-icon name="br-home"></ion-icon>
When running the old version of the app, the icon gets fetched and shown with this url: http://localhost:8100/svg/md-br-home.svg
However, running after the update, the app requests this url: http://localhost:8100/svg/br-home.svg
I'm not sure how the "md-" part is added in the old version of the app, but somehow this have disappeared.
If I change the filename of md-br-home.svg to br-home.svg, it works. Maybe that's the solution? But will this mess something up when I build and distribute this app? I'd like to get a better understanding of how this i supposed to work.
Just found the answer to my question.
Updating Ionic from 4 to 5 changes how icons (ionicons) are handled. Platform specific variants are no longer used, thus "md-" and "ios-" in filenames are no longer used.
https://github.com/ionic-team/ionicons/releases/tag/5.0.0
I just changed the names of the SVG-files beginning with "md-" (e.g. md-br-home.svg to br-home.svg), and then deleted the ones beginning with "ios-".
I also used some standard ionicons icons that had been removed or renamed, so I had to fix that too. A list of all changes is available on the page linked above.