Deployment options for JSS Next.js apps
Next.js applications can be hosted using various services, depending on the prerendering form and your preference.
Headless server-side rendering using the JSS proxy is neither needed for, nor compatible with, Next.js JSS applications.
Production hosting of Next.js JSS applications in integrated mode is not supported.
Deploying on Vercel
The creators of Next.js, Vercel, offer deployment and hosting solutions optimized for Next.js. They support all Next.js features out of the box, including incremental static site (re-)generation, hybrid rendering, and internationalization. Your application can be deployed directly from source control and optimized through Vercel's edge network and serverless functions. Refer to the following resources for more information about deploying to Vercel:
Next.js JSS apps can be deployed to any hosting provider or environment that supports Node.js. For more information refer to the following resources:
Static HTML Export
If you want to deploy your Next.js JSS app using a fully static HTML export, you must be aware of the limitations in supported Next.js features when using
next export. For more information refer to the following resources:
To be able to use an advanced Sitecore editor with your JSS Next.js application, even if you export the app as static HTML with
next export you must run a Next.js instance that is accessible to your Content Management role.
Triggering Webhooks when publishing content
When prerendering the application with static generation or deploying static HTML with
next export, you must trigger a
next build and site deployment on publishing new content. To facilitate this, Sitecore Headless Services and Sitecore Experience Edge for XM can invoke a webhooks. You can leverage Sitecore webhooks with Vercel deploy hooks.