diff --git a/docs/data/routes/docs/nextjs/deploying-to-production/vercel/en.md b/docs/data/routes/docs/nextjs/deploying-to-production/vercel/en.md index 6a1979350b..3dcc9938d3 100644 --- a/docs/data/routes/docs/nextjs/deploying-to-production/vercel/en.md +++ b/docs/data/routes/docs/nextjs/deploying-to-production/vercel/en.md @@ -16,6 +16,7 @@ This guide will demonstrate deploying the Next.js sample app that's generated by * `SITECORE_API_HOST` - your Sitecore API hostname. The `SITECORE_API_HOST` is not required for Sitecore Experience Edge. * `JSS_EDITING_SECRET` - your secret token. The `JSS_EDITING_SECRET` is optional for deployments but necessary if you want to use the Experience Editor with your Next.js Vercel deployment. Read about [connecting your Next.js application to the Experience Editor](/docs/nextjs/experience-editor/walkthrough). * `GRAPH_QL_ENDPOINT` - your GraphQL endpoint. The `GRAPH_QL_ENDPOINT` is required for Sitecore Experience Edge. For Sitecore XM, this is typically optional. By default, the endpoint is calculated using the resolved Sitecore API hostname + the `graphQLEndpointPath` defined in your `package.json`. +2. In the `next.config`, replace `const publicUrl = process.env.PUBLIC_URL;` with ``const publicUrl = process.env.VERCEL_URL ? `https://${process.env.VERCEL_URL}` : process.env.PUBLIC_URL;`` 3. Push the changes to your Git provider. ## Video demonstration