Multi projects (ionic app and web app)


I’m working on developing an application available on both mobile and web. I use on the one hand Ionic 5 Angular and Angular with Material Angular.

The code is very similar and I would like to find a way to reuse as much as possible.

My idea is to create a shared library for logical things : services, interfaces, etc… it’s the easy part.

But how to manage the other components, for example my app-card is ion-card with Ionic and mat-card with Material Angular.

Do you have any advices ? What do you think if I start building my entire library with Ionic components (and therefore using them for the web instead of Material Angular) ?

What about web performance, risks apart from not benefiting components of Material Angular ?

Or should I just put in my library the minimum and develop both versions of my visuals components, strictly the same, each time.

Thanks for your help !

My advice would be to start out using either Ionic or Angular Material exclusively, and then test what you and your users think of the interface. I would not bother trying to maintain two separate UI codebases until you have absolutely rock-solid feedback that either the Ionic experience on desktop or the Angular Material experience on mobile is considered unacceptable.