Skip to content

MicoFrontend discoveries

Naman Parashar edited this page Jun 22, 2022 · 3 revisions

Welcome to the ACE-Website wiki!

Create React App MicroFrontends discoveries

  • CRA MF app won't run if remote i.e @ace/common is having different NODE_ENV than host i.e. @ace/admintable. Issue happens because of mismatch between react-jsx-runtime. For CRA MF to run the react-jsx-runtime needs to be same i.e. react-jsx-runtime.development or react-jsx-runtime.production should be same in both remote and host.

  • In order to avoid the use of @craco/craco MicroFrontends is being used in the ACE-Website monorepo. The reason to avoid the use of @craco/craco is its weird behaviour during development env.

  • MF is not being used in @ace/website, rather @ace/common is being used as package from the monorepo and Gatsby compiles imports outside of ./src without any issues.

  • MF show weird behaviour when sharing same components but conflicting routers. In order to avoid this scenario Wrapper Components are found to be useful. Alongside Wrapper Components error boundaries can be used to avoid the WebApp from breaking even if MF components have any errors.

Clone this wiki locally