⚡️ Next Static Utils ⚡️      
   Utilities to host your next.js app as a static site wherever your heart desires
   Including dynami

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-06-07 18:00:05

⚡️ Next Static Utils ⚡️ Utilities to host your next.js app as a static site wherever your heart desires Including dynamic routes and app router support

Next.js offers an option for static site generation, which allows you to export your site as raw html, js, etc... and host it statically on a CDN, or however you like! This is a great option that reduces the infra overhead of your application.

But SSG does not work with dynamic routes unless you generate all pages at build time. There are some discussions around this issue here and here, which the Vercel team will hopefully resolve soon. But even so, most static hosting providers outside of Vercel don't know how to handle the way next.js does code splitting out of the box, which can lead to unwanted 404 errors.

Next Static Utils aims to provide workarounds and utilities to address some of these issues and make hosting your next.js site statically anywhere you darn well please a bit more enjoyable.

Leave a Comment