joeldenning / simple-single-spa-webpack-example

A simple example of how to use webpack with single-spa
MIT License
294 stars 95 forks source link

multiple angular apps are not working when enableProdMode is in place #16

Open amit131 opened 5 years ago

amit131 commented 5 years ago

When using multiple angular apps with enableProdMode only first angular app works, on clicking next one, there is error in console "app died in status loading_source_code: cannot enable prod mode after platform setup". Even after build step same thing is happening. But without enableProdMode everything is fine and there is no issue (atleast in dev mode)

amit131 commented 5 years ago

I'm of the view since I'm on localhost (OS Windows 8.1) so import { isDevMode } from '@angular/core'; is better here to ascertain my environment. I try to use if(!isDevMode()) enableProdMode(); and am good to go. Now curious to see will it really good in prod environment as well coz on prod environment enableProdMode() should work fine?

amit131 commented 5 years ago

I tested by deploying on surge but still I'm having same issue

olindasequeiram commented 3 years ago

Hi @amit131 Was this error resolved. Im getting the same problem when I have 2 angular apps.