-1

I need to import and reuse in my remotes app some ui-components (table, buttons, etc), which is the best approach? All applications (both shell and remotes) are Angular projects with multi repo.

Possible solutions identified:

  • Publish a npm library with the components (drawback: update every dependency inside every projects whenever an update is done)
  • Define the components in the shell app and expose them as a remote? (Is it feasible? drawbacks?)
  • New Angular project as a remote that expose the components and import them in the other remotes app (is it feasible?)
  • ?
Marco24690
  • 305
  • 1
  • 4
  • 23

1 Answers1

0

I successfully did a proof of concept using module federation at component level using Typescript, Webpack 5, React, a custom boilerplate, created a cli, hosting and deployment. That ecosystem is 0 dependency, almost no packages installation. The design behind it is great. However, it's very hard to scale and stay productive in real use case. I tried to use all these tools that I have implemented to create a real software and unfortunately, it is too early to do it in an acceptable time frame. The lack of normal tooling and documentation, since it is relatively new, makes it very challenging at the moment. That being said, it is possible :)

Biggest challenges so far are:

  1. After reaching more then 30 components, it becomes hard to make changes. My cli is too drafty and would require a more complete implementation.
  2. Using Typescript, it is more challenging to inspect state at runtime. Debugging is much more harder.

You can look at the monorepo of my POC. It's totaly not ready for anything else then R&D. It may help.

https://github.com/Infinisoft-inc/kitchen-next

Feel free to ask question :)

Martin Ouimet
  • 19
  • 1
  • 5