' ChunkloadError'仅发生在某些用户...为什么?

发布于 2025-01-19 23:00:28 字数 410 浏览 4 评论 0原文

在React + WebPack项目上,在实现代码拆分后,我开始在Sentry上看到块负载错误但是,这只会发生在少数用户中。我从未在网站上遇到过块负载错误,也没有任何队友。我们无法确切地指出谁遇到了块负载错误(正如哨所在哨兵上报道的那样)。我们只知道少数用户发生块负载错误。

我们在CDN上托管所有JS,CSS文件,并为每个部署版本保留一个单独的文件夹,并在该文件夹中保留除index.html以外的所有构建文件。因此,旧的块文件仍然保留在文件夹中。

我该如何解决这个问题?我很乐意为何只有某些用户可能会发生这个错误的原因。

某些浏览器是否可以下载多少个块?我们确实应用splitchunks:{块:'all'},所以我想知道这是否导致这些用户加载的延迟...?

On a react + webpack project, after implementing code splitting, I started to see chunk load errors on the sentry. However, this is only happening to a few users. I have never encountered chunk load errors on the site, nor has any of my teammates. We can't pinpoint exactly who experiences the chunk load error, (as it's just reported on the sentry). We only know that chunk load error occurs to a few users.

We host all our JS, CSS files on CDN, and we keep a separate folder for each deployment version and in the folder keep all the build files except index.html. So the old chunk files still remain in the folder.

How can I go about resolving this issue? I would love to get some pointers to why this error might be happening to only certain users.

Do certain browsers have limits to how many chunks can be downloaded? We do apply splitChunks: { chunks: 'all' }, so I wonder whether this is leading to some delays in loading for those users...?

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

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

发布评论

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