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 size for node_module firebase increases significantly when upgrading from Next 14 to 15 #77268

Open
MaxPuckeridge opened this issue Mar 19, 2025 · 2 comments
Labels
Performance Anything with regards to Next.js performance.

Comments

@MaxPuckeridge
Copy link

Link to the code that reproduces this issue

https://github.com/MaxPuckeridge/nextjs-bundle-issue

To Reproduce

I've made two versions of a nextjs app.

The original was made using npx create-next-app@14 in the oldee folder. I added a very basic import of a firebase utility to make sure it is pulled into the build.

I then made a copy of this app, in the newee folder, and then ran npx @next/codemod upgrade saying yes to most options, including react 19.

There is @next/bundle-analyzer for both, and the outputs of both are in the outputs/ folder in the root of the repo.

There is a noticable change in firestore between the two nextjs versions. The main difference seems to be the gzipped version, 41 vs 70kb

Image
Image

Current vs. Expected behavior

Ideally the size of our node_modules should stay the same or be better. A regression to bundle size is not ideal

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.2.0: Fri Dec  6 19:01:59 PST 2024; root:xnu-11215.61.5~2/RELEASE_ARM64_T6000
  Available memory (MB): 16384
  Available CPU cores: 10
Binaries:
  Node: 20.18.3
  npm: 10.8.2
  Yarn: 1.22.15
  pnpm: 8.15.3
Relevant Packages:
  next: 15.2.3 // Latest available version is detected (15.2.3).
  eslint-config-next: 15.2.3
  react: 19.0.0
  react-dom: 19.0.0
  typescript: 5.8.2
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Performance

Which stage(s) are affected? (Select all that apply)

next build (local), Other (Deployed), Vercel (Deployed)

Additional context

No response

@github-actions github-actions bot added the Performance Anything with regards to Next.js performance. label Mar 19, 2025
@GusRuss89
Copy link

This is preventing us from upgrading to v15. Can anyone explain why it's affecting the bundle size of another package so much?

@kdy1 kdy1 assigned kdy1 and unassigned kdy1 Mar 26, 2025
@kdy1
Copy link
Member

kdy1 commented Mar 28, 2025

Can you try some older version of next@v15? webpack/webpack#19184 seems to be the cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Anything with regards to Next.js performance.
Projects
None yet
Development

No branches or pull requests

3 participants