Angular微前端无限刷新
我正在尝试使用 webpack 模块联合构建 Angular Micro 前端。我已将所有自定义 webpack 文件添加到应用程序中。所有应用程序都构建良好。另外,当我尝试从各自的路径访问各个微前端时,它工作正常,但是当我尝试从 shell 应用程序访问各个微前端时,它会遇到无限刷新。我正在关注这个文章作为参考。
不知道除了本文中提到的之外我还需要做什么。任何帮助都会得到帮助。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到了防止实时重新加载问题的解决方案。您需要将 publicHost 属性添加到 angular.json 中的远程配置中。因此,调整project/remote-project-name/architect/serve/options部分如下:
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: