Open LoiLock opened 1 year ago
I'd noticed the same issue and have been waiting/hoping it would be fixed. It added nearly 9 kB's in my case. 272 kB after upgrade, 263 kB before. I'm not expecting every upgrade to be the same size or smaller, but 9 kB seemed like a good sized jump.
Hi @DustinBrett. adding a reproduction in this case would be beneficial, as this can happen for many reasons, and it's not possible to tell without some actual code to look at.
@LoiLock are you able to pin down a specific version this increase was introduced in? This could help investigate if this was a regression in our minifier, a dependency/vendored package change, or something else.
You can use @next/bundle-analyzer
to analyze bundle sizes across Next.js versions.
@balazsorban44 Well, any version right after 13.4.19 adds extra. A few kb per minor version bump.
The following screenshots are from a full project, the only thing that was changed was the next version, with the .next
and node_modules
cleared before every build, just to be sure.
13.4.19: 13.5.2: 13.5.6: 13.5.7-canary.11:
Keep in mind though, with the example that I provided, I used yarn create next-app --example reproduction-template-pages
so the increase happens regardless of whether other packages are installed.
Hi @DustinBrett. adding a reproduction in this case would be beneficial, as this can happen for many reasons, and it's not possible to tell without some actual code to look at.
I was just agreeing with OP and not making my own bug report and going through making a reproduction. I've decided to stay at 13.5.3
and see how things improve with reports like this one.
@DustinBrett I appreciate it, but in this case, the "same issue" comment was not really helpful/actionable, and simply :+1:-ing the original post is enough in this case, to keep the conversation relevant/helping the investigation.
So far, the changes seem to be growing slowly over versions, which might just be the added code to the codebase, and not a verifiable as a regression.
In case it helps... I am seeing the same issue (5% increase in bundle size) but only starting with version 13.5.4.
I compared some files locally in our codebase. It seems that the minifyer has changed a lot. See https://github.com/vercel/next.js/pull/56281 for example
Hi, the bundle size increased 20% + for our case, checked with webpack-bundle-analyzer, it's mainly caused by browserify
related code
13.5.6 vs 13.5.2
Any updates/comments?
Issue keeps increasing quite drastically, just upgrading to the latest next@15.0.0-canary.91 added about 10-15kb to my bundle
Same here, Nextjs 15.0.3 Hello world after build is now shipping 100kb to the client (first load js)
Link to the code that reproduces this issue
https://github.com/LoiLock/nextjs-bundle-size
To Reproduce
Recently I found that after only updating nextjs, the bundle size has increased quite a bit for what is only a minor version bump.
The following screenshots were after a fresh install
Not sure where to go from here, would like to find out what causes the increase in size.
Current vs. Expected behavior
13.4.19:
13.5.7-canary.11:
Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure
Additional context
No response