DEV Community

Pacharapol Withayasakpunt
Pacharapol Withayasakpunt

Posted on

Hosting SSG outside creator's intended cloud (Next.js)

How was the experience, especially if you Next.js website is not only static site, but also has API functions?

Actually, even if static site, I felt that SPA experience is missing on navigation, if next export.

In short, I don't want to move from Netlify to Vercel.

Top comments (1)

Collapse
 
niyiao profile image
Adeniyi Adeosun

No, you don't have to use Vercel even for API routes. It should work just as well hosted anywhere else.

next export should give you a static SPA with the pages pre-rendered. If your browser loads on navigation, make sure you're using the Link component from next/link.