I've been building apps with Next.js for months now. Its built-in routing, SEO support, and other benefits made it a no-brainer over plain React when building full-stack web applications. But there’s one thing that’s been consistently frustrating:
The development speed is painfully slow.
Next.js Hot Reload is supposed to make updates from your code to the browser faster, but really, every small code change feels like waiting for a full rebuild. I experience freezing pages and lagging terminals, even when working on something as simple as a landing page. It really makes me question if this is truly the "React on steroids" that everyone talks about.
I've worked on Vite + React projects, and I recalled the development speed was never this slow regardless of how complex the project was, so I decided to run up a simple Vite + React and Next.js project to contrast their speed, and within minutes, I noticed that the Vite + React app was A LOT faster, and it wasn't even close. There were no page reloads, no rebuild delays—just instant feedback.
So this begs the question:
If Vite can give this kind of developer experience, why is Next.js still so far behind?
The Reality of Next.js in a Development Environment
When you look at the marketing for Next.js, it seems like a great solution for React developers (and it is). It offers:
✅Built-in routing
✅Server-side rendering (SSR)
✅API routes
✅SEO optimization
✅Full stack capabilities
But there's a downside; Next.js can sometimes feel like it's working against you during development.
Every time you save a file, the terminal starts multiple rebuilds. The browser refreshes slowly, and if you're working on a large, complex application or have many dynamic routes, it gets even worse. Navigating to a different route takes a lot of time, and it's not just your machine causing this (which I initially thought). So then...
Why is Next.js so slow?
After a little bit of research, I realized it isn’t actually a “me” problem; many developers have shared their frustration online:
- “Next.js is insanely slow in dev mode” – StackOverflow thread
- "Next.js is painfully slow" - Reddit post
- "Next.js is extremely slow" - Reddit post
After more digging, I realized that it comes down to how the framework is built under the hood. Here’s what I found:
1. Next.js Compiles Everything — Client And Server
As a full-stack framework, Next.js isn’t just compiling your frontend like Vite does; it’s compiling both the frontend and the backend at once. So this means every time you hit save, the Next.js compiler has to figure out:
“Does this affect the client? The server? or Both?
...then it rebuilds accordingly. So it kind of makes sense that a one-line tweak might still trigger a chain reaction that takes seconds instead of milliseconds (not very efficient, in my opinion).
2. Hot Reload ≠ Hot Module Replacement
Next.js uses React Fast Refresh, which is supposed to preserve component state between edits. But in practice, especially in larger apps, Fast Refresh is slower, less predictable, and sometimes triggers a full page reload anyway.
Meanwhile, Vite uses native ESM and Hot Module Replacement (HMR), so it only swaps the module that changed without doing extra work. It’s way lighter.
3. Still Built on Webpack (Unless You Switch to Turbopack)
By default, Next.js still uses Webpack in dev mode — and Webpack is not known for speed. It was designed before ESM became mainstream, and it rebuilds too much by default.
Vite, on the other hand, uses esbuild (written in Go) and rollup for production. The difference is a lot, and for reference, Vite can cold-start a dev server in under 300–500 ms, while Next.js sometimes takes 10–20 seconds or more in a mid-size project.
4. File Watching
Next.js watches a lot of files. This includes components, pages, layouts, server functions, and basically any custom config files. So if you have a large number of routes/components, Next.js file-watching gets heavier and can hit your CPU hard, making things feel slower.
5. Your Machine is Still a Factor
If you're running both server-side and client-side code locally (which you are with Next.js), your laptop or PC ends up doing a lot more work than in a basic client-only setup, and if you don't have a mid- to high-end PC, the developer experience can be frustrating.
Workarounds & Solutions
To be fair, Next.js IS a full-stack framework, so it does a lot under the hood; so for a better developer experience, there are some things you can tweak to improve the speed:
1. Try Turbopack with next dev --turbo
Vercel is currently working on Turbopack, their Webpack replacement written in Rust. It’s still in early stages, but it can offer faster refresh times — especially in smaller apps.
You can use Turbopack in your app by replacing the dev
script in your package.json
file with next dev --turbopack
"scripts": {
"dev": "next dev --turbopack",
}
2. Keep Pages and Components Small
It’s simple logic that big files = bigger rebuilds, regardless of the framework. If you split your app into smaller components and pages, you reduce the surface area that triggers a rebuild.
3. Lazy-Load Heavier Routes or Components
If you’re importing a huge component statically, it gets bundled into everything. Use Next,js dynamic import dynamic()
to load heavy UI or logic only when needed.
import dynamic from 'next/dynamic'
const HeavyComponent = dynamic(() => import('../components/HeavyComponent'))
4. Offload Your Backend
If you're doing API stuff inside Next.js api routes (/api
), it might slow things down, so try separating your backend into a service (like Firebase, Supabase, or even a separate Express API) during development. This will lighten things up for the compiler.
Final Thoughts
So with all these said, should you ditch Next.js? Well, it depends.
It’s easy to get frustrated (I’ve been there), but context matters. Here’s how I think about it now:
When Next.js Makes Sense
You’re building a full-stack app with server-side logic
You need SEO optimization or static generation
Also, Next.js performance optimizations, image handling, SSR, and edge capabilities are great in production.
When Vite Might Be Better
You’re building a frontend-heavy app or design tool
You want instant feedback during development
You’re prototyping and speed matters more than structure
For dev experience (especially speed), Vite is just better right now.
So what has been your experience so far with Next.js? Have you run into the same dev-speed issues? Did Turbopack help, or did you eventually switch to something like Vite?
Feel free to share your thoughts in the comments.
Top comments (9)
I don't think offloading your Next.js API routes to some service is the solution. What if Next.js had a mode where you select the sort of task you are doing and it only compiles for such task. Like if you were building with API routes, it compiles without considering API routes.
That’s an interesting thought! If Next.js had a mode that allowed developers to select the specific task they're working on (e.g., frontend-only, API routes, SSR, etc.), it could definitely improve development speed.
I just remembered our call days ago when nextjs was dealing with me. Thanks for this information
Yeah, our call kind of inspired this post tbh
Love this❤️❤️❤️
Thank you!!
Basically summarising everything, NextJS is good for building websites but has a very bad developer experience.
Thanks for sharing this with us, Chris 😊
Exactly!
Your'e welcome Vic
Making use of server actions to reduce server side logic also help improve performance in Next.js.
Especially if its a sort of large production codebase, I use this currently