Sharing a Reusable Component Between Microfrontends in Angular using Module Federation

68 views Asked by At

I'm working on an Angular application utilizing Module Federation, currently consisting of 9 microfrontends (MFEs). Initially, I created a shared library for common functionalities like date format handling.

Now, I have a new requirement: sharing a specific component developed in MFE1 with all other MFEs.

Sharing means having the ability to use the specific component in other MFEs, if they wish, and pass some parameters to that component.

I'm looking for the best practices to achieve this while adhering to established patterns and ensuring maintainability.

For example, try to do that from the shell?

Feel free to share:

Your preferred approach and reasoning. Specific implementation considerations or potential challenges. Relevant resources or examples to further explore.

Thanks in advance for your help!

I tried to create a components library and it works, i can use the common components in all MFEs, but i'm not sure if it's a good pattern.

0

There are 0 answers