manfredsteyer / multi-framework-micro-frontend

76 stars 36 forks source link

Cannot enable prod mode after platform setup. #9

Open Angelotas opened 2 years ago

Angelotas commented 2 years ago

Running each microfront in production mode, there is a problem when I try to load two mfe which have the same Angular version, for example, considering your example, MFE2 and MFE3. After I initialize one of them, when I navigate to another I receive this error:

image

I have hidden it managing the error like this:

if (environment.production) {
  try {
    enableProdMode();
  }
  catch (e) {
    console.log(e);
  }
}

But I don't understand why it's happening.

Thanks in advance.

vugar005 commented 2 years ago

This is because shell application already runs this. So you dont need to enable prodMode on remote apps. I solved it by removing it.