I now just use a React SPA with Vite.
I now just use a React SPA with Vite.
For folks who use this every day, how/why is this acceptable?
I had the same experience of slow refreshes on the NextJS project I worked on (running locally) and the other seasoned NextJS developers didn't think it was unusual.
While I thankfully don't have to use Nextjs often, in general I am not sure I even launch my app in the browser every single day. Your tests and whatnot are already providing continuous feedback about the state of the code. 6-7 seconds every once in a while wouldn't be the end of the world.
But even it were instantaneous, Nextjs has a horrible developer experience for a multitude of other reasons.
To be fair it sounds like you didnt need Next.js in the first place then? SPA is more of an alternative than an analog.
6-7s for HMR is terrible though. Agreed.
What most web-apps need is just a very basic SSR step for the shell of the app, not everything needs to be server side rendered, in the cases where that is required we've had other SSR first frameworks that already solve that problem.
That's where ~all of Next.js' complexity comes from, and it should definitely be appreciated for that because it's a hard problem.
But if you don't need that, I don't see why you'd use something so brittle, complicated, and experimental.
Complexity does arise there, but equally arises from limitations imposed by the Vercel service that Next.js ultimately needs to deal with. A lot of its seemingly dumb design decisions make sense once you consider the constraints Vercel (the service) forces upon it, but they are still poor decisions you have to live with that wouldn't have been necessary if it were intended to run in a "normal" computing environment.