Bundle splitting per page with createPages API stopped working after updating to Gatsby 4.5.0
davidhoneyb opened this issue · 0 comments
davidhoneyb commented
Preliminary Checks
- This issue is not a duplicate. Before opening a new issue, please search existing issues: https://github.com/gatsbyjs/gatsby/issues
- 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
After updating Gatsby from 4.4.0 to 4.5.0, the bundle split per page functionality stopped working. We use the createPages
API to create pages dynamically. We expected each page to have its own bundle, but now it appears that the entire app is bundled together when running gatsby build
.
Reproduction Link
https://github.com/HoneyBook/gatsby-minimal-reproduction
Steps to Reproduce
- Clone the minimal reproduction repository: https://github.com/HoneyBook/gatsby-minimal-reproduction
- Install dependencies:
npm install
- Build the project:
npm run build
- Observe the bundle splitting behavior in the build output.
Expected Result
Each page should have its own bundle as it did in Gatsby 4.4.0.
Actual Result
The entire app is bundled together, and bundle splitting per page is not working in the build output.
Environment
System:
OS: macOS 14.4.1
CPU: (10) arm64 Apple M1 Max
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.9.0 - ~/Library/Caches/fnm_multishells/56387_1719134227025/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v14.19.3/bin/yarn
npm: 10.1.0 - ~/Library/Caches/fnm_multishells/56387_1719134227025/bin/npm
Browsers:
Firefox: 113.0.2
Safari: 17.4.1
npmPackages:
gatsby: ^5.13.5 => 5.13.6
gatsby-link: ^5.13.1 => 5.13.1
gatsby-plugin-breakpoints: ^1.3.11 => 1.3.11
gatsby-plugin-eslint: ^4.0.4 => 4.0.4
gatsby-plugin-manifest: ^5.13.1 => 5.13.1
gatsby-plugin-offline: 5.10.1 => 5.10.1
gatsby-plugin-react-helmet: 5.10.0 => 5.10.0
gatsby-plugin-react-i18next: 1.2.2 => 1.2.2
gatsby-plugin-react-svg: ^3.3.0 => 3.3.0
gatsby-plugin-sass: 5.10.1 => 5.10.1
gatsby-plugin-sitemap: 5.10.1 => 5.10.1
gatsby-plugin-split-css: ^2.0.3 => 2.0.3
gatsby-plugin-webfonts: ^2.3.2 => 2.3.2
gatsby-plugin-webpack-bundle-analyser-v2: 1.1.26 => 1.1.26
gatsby-source-filesystem: ^5.13.1 => 5.13.1
gatsby-transformer-gitinfo: ^1.1.0 => 1.1.0
Config Flags
No response