Migrate an existing angular app into a mfe host
See original GitHub issueCurrent Behavior
I have an existing angular app using the latest version of nx (14.1.9). I now want to migrate this relatively big app to be a mfe host. In a first step even without any remotes. The current app should just function as a host. So I called the ng generate @nrwl/angular:setup-mfe
schematic to transform the current app into a host:
Everything compiles and the application can be served but when I reload the page in the browser, I get:
I couldn’t find any documentation on how to migrate an existing app to a mfe host and I have absolutely no idea where to even look for a solution or how to tackle this error. I trimmed down the app so that the main.ts and the app component are very simple but I cannot get it to work. Is it some configuration issue? Is my assumption correct that this should work without any issues?
Expected Behavior
I was expecting, that adding a host is not a problem as it is just the host that can contain the “old” app without any issues.
Failure Logs
Uncaught Error: Shared module is not available for eager consumption: 482323
at Object.__webpack_require__.m.<computed> (consumes:287:1)
at __webpack_require__ (bootstrap:24:1)
at fn (hot module replacement:61:1)
at Module.31126 (polyfills.js:14:80)
at __webpack_require__ (bootstrap:24:1)
at startup:6:1
Environment
Node : 16.13.2 OS : win32 x64 yarn : 1.22.5
Issue Analytics
- State:
- Created a year ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
Your npm cache could be causing the
npx create-nx-workspace@latest
issue.I’ve found the issue with the polyfill and I’ll have a fix created for it soon
Hi @tadamczak did you find a solution for this? We are facing the same issue