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?