WebPack模块联合会错误ScriptexternAlloaderror:加载脚本失败

发布于 2025-02-03 03:00:39 字数 1903 浏览 5 评论 0 原文

”在此处输入映像说明“

注意:我尝试直接在浏览器 https:// localhost:5007/accom-web/dist/dist/js/assets/browsers- bundle/removeentrytest.js ,我为远程entrytest.js文件提供服务。

这是我在主机中的Webconfig。

这是远程应用程序的WebConfig。

远程应用程序的优化配置如下。

optimization: {
    runtimeChunk: false,
    emitOnErrors: true,
    splitChunks: {
       minSize: 256000,
       minChunks: 1,
       maxAsyncRequests: 10,
       automaticNameDelimiter: '-',
       cacheGroups: {
           chunks: 'initial',
           .....
       },
    },
    .....
}

我也查看了有关此问题的问题,但没有多大帮助。

https://github.com/mmodule-federation/module-federation/module-federation-examples /eskoes/307 https://github.com/module.com/module-federation/module-federation-examples- /esseage/1273 https://github.com/module.com/module-federation/module-federation-examples /eskoes/692

对此如何解决该建议?

My host is throwing this error.

enter image description here

NOTE: I tried accessing this directly in the browser https://localhost:5007/accom-web/dist/js/assets/browser-bundle/remoteEntryTest.js and I'm served the remoteEntryTest.js file.

This is my webconfig in host.

enter image description here

This is webconfig of remote application.

enter image description here

Optimization config for remote application is below.

optimization: {
    runtimeChunk: false,
    emitOnErrors: true,
    splitChunks: {
       minSize: 256000,
       minChunks: 1,
       maxAsyncRequests: 10,
       automaticNameDelimiter: '-',
       cacheGroups: {
           chunks: 'initial',
           .....
       },
    },
    .....
}

I looked at the GitHub issues regarding this too but didn't help much.

https://github.com/module-federation/module-federation-examples/issues/307
https://github.com/module-federation/module-federation-examples/issues/1273
https://github.com/module-federation/module-federation-examples/issues/692

Any suggestions on this how to fix it?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

べ映画 2025-02-10 03:00:39

我在遥控器上指定共享依赖项也有类似的问题。在审查了您的GitHub参考文献后,我最终不得不禁用Splitchucks。我确定您也尝试了这一点,但是这使我的遥控器再次工作。

optimization: {
        splitChunks: false,
    },

I had a similar issue with specifying shared dependencies on a remote. I ended up having to disable splitChucks after reviewing your Github references. I'm sure you tried that as well but this got my remote working again recently.

optimization: {
        splitChunks: false,
    },
澜川若宁 2025-02-10 03:00:39

在遥控器中将URL HTTPS 更改为 http 。它对我有用

Change the URL https to http in remotes. It works for me

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文