Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Next.js does server rendering, but it doesn’t do this. Even with full static site generation, Next.js still sends the whole thing in a JS bundle to render on the client, even fully static components with no interactivity.


FWIW, you can disable this per page by adding `export const config = { unstable_runtimeJS: false}`.

Marked unstable because it was just recently added and is experimental. Per page is about the best Next can do, as it would need React itself to decide how to do this per component, which looks to be a big part of this new RFC.


Thanks. I meant to mention this but forgot. And it’s certainly an improvement over “just schlep everything to the browser”, but it’s not a great solution for something like a long form static blog post with an interactive button in the site header.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: