I’d like to introduce my library that makes the IonIcon usage in standalone build really easy. It frees you from cumbersome addIcons business while keeping the same template.
Please give it a try. Any comments and suggestions are welcome!
I’d like to introduce my library that makes the IonIcon usage in standalone build really easy. It frees you from cumbersome addIcons business while keeping the same template.
Please give it a try. Any comments and suggestions are welcome!
11.4 MB unpacked ![]()
It kills the actua persope of addIcons()
addIcon only exports imported icons and not whole bunch on non-required icons.
Yeah, having a component each defined for every icon kinda does that.
Fortunately, Angular’s tree-shaking strips most of them leaving a tiny fraction that you actually import. (Of course, as long as the optimization is not turned off, that is.)
no need to import each icon in every other component.
just import required icons in app.component.ts and use addIcons()
That can work for a simple app I suppose…
When you have several actively maintained apps with hundreds of shared components in a single monorepo, it’s not practical to manage them centrally.
Also, if every icon is imported in app.component, all the icon data are included in the main bundle, whereas if icons are imported at the component that use them, chances are those icons are only included in the bundle that actually needs them. This is important when you have many lazy-loaded routes.