如何在 S3 上部署微前端

发布于 2025-01-19 07:54:04 字数 784 浏览 3 评论 0原文

我正在尝试按照以下说明在 S3 上部署微前端:

在 AWS 上部署微前端

有两个应用程序 - 远程和主机。

远程上传成功后我就可以看到该应用程序了。

按照说明,我将模块联合插件内的远程属性更改为从 S3 获取并直接指向 remoteEntry.js 的 url。

          remoteHome: 'home@http://microfront.poc.s3-website-us-east-1.amazonaws.com/remoteEntry.js'.

当我部署主机并访问 url 时,应用程序不会呈现其内容或远程应用程序。我看到以下日志:

  1. 无法加载资源:服务器响应状态为 404(未找到)

  2. ScriptExternalLoadError:加载脚本失败。 (缺少:http://microfront.amazonaws.com/remoteEntry.js) 加载“./Home”时。

知道怎么做吗

I'm trying to deploy Micro-frontend on S3, following these instructions:

deploy micro-fronted on AWS.

There are two apps - Remote and Host.

I was able to see the app after the remote upload was successful.

Following the instructions, I changed the remote property inside the module federation plugin to the url that gets from S3 and points directly to remoteEntry.js.

          remoteHome: 'home@http://microfront.poc.s3-website-us-east-1.amazonaws.com/remoteEntry.js'.

When I deploy the host and visit the url, the app does not render its content or the remote app. I see the following logs:

  1. Failed to load resource: the server responded with a status of 404 (Not Found)

  2. ScriptExternalLoadError: Loading script failed.
    (missing: http://microfront.amazonaws.com/remoteEntry.js)
    while loading "./Home".

any idea how to do that

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

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

发布评论

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