使用模块联合共享第三方库

发布于 2025-01-10 15:16:00 字数 215 浏览 1 评论 0原文

我们有使用 webpack 模块联合的微前端应用程序。我们的架构如下所示: 通用应用程序:托管所有共享的自定义组件。 所有其他应用程序:依赖通用应用程序来获取和使用自定义组件

我还想确保通用应用程序和其他应用程序使用相同的第三方库,以便每当有更新时我们只更新通用应用程序而不接触其他应用程序。 从通用应用程序导出这些库并让其他应用程序通过remoteEntry导入它们是一个好主意还是有更好的解决方案?

We have micro frontend apps using webpack module federation. our architecture looks like this:
common app: hosts all the shared custom components.
all other apps: depend on the common app to get and use the custom components

I want to also make sure that common and other apps use the same third party libraries so that whenever there's an update we only update the common app without touching other apps.
is it a good idea to export these libraries from the common app and make other apps import them through remoteEntry or are there better solutions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文