最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

reactjs - Why even after code splitting using react loadable npm package, my main.chunk.js file size still same? - Stack Overflo

programmeradmin3浏览0评论

In my application, I'm doing code splitting using React Loadable as we need to load dynamic imports. We are using Sitecore JSS Layout Service to load components.

For reference, we are following Sitecore's documentation at .php/2018/08/Code-splitting-with-Sitecore-JSS-React.

All my components are rendering and loaded correctly, but I'm unsure why my main.chunk.js file is still the same size even after code splitting. Additionally, I can see some extra chunks named 1.chunk.js and 2.chunk.js are being loaded alongside my newly-loaded component chunks.

Why are these chunks loading? Is this expected behavior, or am I doing something wrong?

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论