[X] This issue is not a question, feature request, RFC, or anything other than a bug report directly related to Gatsby. Please post those things in GitHub Discussions: https://github.com/gatsbyjs/gatsby/discussions
Description
We have a big gatsby app. We have several pages and some client based paths.
Reading this https://www.gatsbyjs.com/docs/how-code-splitting-works i understand that each page should load its own JS and css and not a single bundle between pages.
In our case everything is bundled in one single app-[chunk] file.
The webpack json stats file:
Shouldn't we be seeing that it loads component---src-pages-index-js-d3fd21c2a69c172d44f3.js on the index page instead of /app-133183b18582f05942c6.js ?
Whats more here is that all our source is in that app.js with all dpeendencies etc. It makes that bundle super huge.
Reproduction Link
there is none :(
Steps to Reproduce
I can't provide a reproduction repo. I know this is annoying but I could maybe give this selectively to help us.
I can provide any other necessary detail from the build.
We use @loadable/webpack-plugin to load some components in the source code. Could this be affecting everything?
Expected Result
I would expect that the code splitting per page is respected
Preliminary Checks
Description
We have a big gatsby app. We have several pages and some client based paths. Reading this https://www.gatsbyjs.com/docs/how-code-splitting-works i understand that each page should load its own JS and css and not a single bundle between pages.
In our case everything is bundled in one single app-[chunk] file. The webpack json stats file:
To my understanding this seems correct to me!
The chunk json also seems correct to me:
But for example the index html page loads at the end of the body:
Shouldn't we be seeing that it loads
component---src-pages-index-js-d3fd21c2a69c172d44f3.js
on the index page instead of/app-133183b18582f05942c6.js
?Whats more here is that all our source is in that app.js with all dpeendencies etc. It makes that bundle super huge.
Reproduction Link
there is none :(
Steps to Reproduce
I can't provide a reproduction repo. I know this is annoying but I could maybe give this selectively to help us. I can provide any other necessary detail from the build.
We use
@loadable/webpack-plugin
to load some components in the source code. Could this be affecting everything?Expected Result
I would expect that the code splitting per page is respected
Actual Result
One single bundle instead of a per page one.
Environment
Config Flags
No response