Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle splitting per page with createPages API stopped working after updating to Gatsby 4.5.0 #39022

Open
2 tasks done
davidhoneyb opened this issue Jun 23, 2024 · 0 comments
Open
2 tasks done
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby

Comments

@davidhoneyb
Copy link

Preliminary Checks

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

  1. Clone the minimal reproduction repository: https://github.com/HoneyBook/gatsby-minimal-reproduction
  2. Install dependencies: npm install
  3. Build the project: npm run build
  4. 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.

image

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

@davidhoneyb davidhoneyb added the type: bug An issue or pull request relating to a bug in Gatsby label Jun 23, 2024
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jun 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

1 participant