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
4% increase in bundle size from next 11.1.2 to 12.0.7 #32417
Comments
I also just tried to bump from v11.0.0 to v12.0.7 and experienced similar increase of about 4kb in first load JS. |
Same here, from If I enable |
Could you please try |
@huozhi Without With |
@TheThirdRace Do you have a minimal reproduction for it? @LarsBuur does this version solve your problem? |
@huozhi Unfortunately, I don't have a version at I'll send you an invite to my private repo so you can check it out yourself. I have a branch If you want to validate build size from |
@huozhi. Yes this solves my problem. I see the same bundle size moving from 11.1.2 to 12.0.8-canary.13. Thank you for your effort. |
@TheThirdRace It feels like sth else besides the styled-jsx since it's resolved for the original issue. Would you mind opening another issue with a minimal reproduction with more public visibility so that more people can help on it? 🙏 |
This didn't solve my bundle size increase. On 11.0.0 first load JS is 98.1kb, and on 12.0.8-canary.13 it is 102kb. |
@huozhi And without the code itself, I doubt anyone can really help... I sent your an invite already for the |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
We introduced the `StyleRegistry` on server side to make it concurrent safe for requests. For client we can have only 1 registry since there's only 1 instance per browser window. Keep consistence with previous usage Closes vercel#32417 Closes vercel#30377 Revert change in vercel#31357, it's not required anymore
What version of Next.js are you using?
12.0.7
What version of Node.js are you using?
14.15.1
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
Vercel
Describe the Bug
We have been struggling with our bundle size and put a huge effort into making it as small as possible
Going from Next v. 11.1.2 to 12.0.7 means an increase in bundlesize from 127Kb to 132 kb.
This is before and after from next build:
We tried enabling and disabling swcMinify in next.config.js without any noticeable difference
Is this to be expected?
Expected Behavior
Same of less size. Not bigger.
To Reproduce
The difference in percentage would differ from project to project. To reproduce just monitoring bundle "First Load JS" from next build reveals the problem
The text was updated successfully, but these errors were encountered: