Open MartinXPN opened 7 months ago
I have the same issue after upgrading the library as well.
I encountered the identical problem following the library upgrade too.
Any updates on this?
Edit by maintainer bot: Comment was automatically minimized because it was considered unhelpful. (If you think this was by mistake, let us know). Please only comment if it adds context to the issue. If you want to express that you have the same problem, use the upvote 👍 on the issue description or subscribe to the issue for updates. Thanks!
going through the same issue after upgarding the library
Seems like the latest release of NextJS (14.2) fixed this issue partially. The project currently builds just 2X slower. Yet, deploying it to Vercel takes forever. The longest step seems to be the one that creates the serverless functions (used to be only a couple of seconds):
Created all serverless functions in: 16:32.559 (m:ss.mmm)
Link to the code that reproduces this issue
https://github.com/MartinXPN/next-slow-build-reproduction
To Reproduce
Current vs. Expected behavior
It currently takes ~15x longer to build a project with a large client-side component compared to the previous NextJS version. This REALLY hurts the developer experience! It should take way quicker to build the whole project and produce the production build.
For this small project, it took ~500s to build with the latest Next.js version, while it used to take only ~40 with the 13.4.9 version.
Using the latest version of NextJS actually resulted in a 20x build slowdown on one of my actual projects (not the reproduction above) making each build ~40 minutes instead of 2. Imagine how terrible it is to wait for 40 minutes for every minor change to hit production!
Provide environment information
Which area(s) are affected? (Select all that apply)
Not sure, App Router, Dynamic imports (next/dynamic)
Which stage(s) are affected? (Select all that apply)
next build (local), Vercel (Deployed)
Additional context
I've also reproduced this with a large form using
react-hook-form
andzod
.There was a recent fix that was supposed to fix this issue but actually had no effect on my projects.
This is the same project with the same dependencies (NextJS latest version VS
13.4.9
). Imagine the pain of waiting 40 minutes every time you push to production (while it used to take only 2 minutes).