So, I've been using Next.js professionally and privately for several years now and am quite fond of it.
With the app dir being "stable" I made the leap and used it in a greenfield project. What I've noticed is that the compilations locally are extremely slow. Since I've never faced a similar issue, I'm not sure where to start to look if the obvious ones don't solve it.
- How does one debug long compilation times?
- What is usually the culprit?
- Have I missed a config somewhere?
- Is it the dependencies, if so how do I debug?
- Modules that get updated is watch but shouldn't?
- Tailwind config?
Example repo (not mine) but very similar setup: https://github.com/batuhanbilginn/supabase-nextjs-server-auth
- wait compiling...
- event compiled client and server successfully in 3.9s (1859 modules)
- wait compiling...
- event compiled client and server successfully in 8.9s (1859 modules)
- wait compiling...
- event compiled client and server successfully in 1644 ms (1842 modules)
- wait compiling...
- event compiled client and server successfully in 816 ms (1842 modules)
I'm using a Mac mini m1, 16gb ram.
Dependencies from my package.json is attached.