Reputation: 760
I am trying to build Angular Micro frontend using webpack module federation. I have added all custom webpack files to the application. All applications builds fine. Also, When I try to access the individual micro frontend from their respective path then it is working fine but when I try to access individual micro frontend from the shell application then it is running into infinite refresh. I am following this article as a reference.
Not sure what else I need to do other than mention here in this article. Any help will appriciated.
Upvotes: 2
Views: 2689
Reputation: 276
I found the solution to prevent issues with live reloads. You need to add a publicHost property to your remote's configuration in your angular.json. Hence, adjust the section project/remote-project-name/architect/serve/options as follows:
[...] "options": {
+ "publicHost": "http://localhost:3000",
"port": 3000,
"extraWebpackConfig": "projects/mfe1/webpack.config.js" } [...]
Upvotes: 7