Next.js Discord

Discord Forum

Where to specify `deploymentId` in `next.config.js`?

Unanswered
Sun bear posted this in #help-forum
Open in Discord
Sun bearOP
(Background: I'm using the /pages router)

I saw that Next.js can help with version skew issues if I specify deploymentId in my next.config.js file. It's mentioned here under the "Version skew" section of the docs: https://nextjs.org/docs/pages/building-your-application/deploying#version-skew

You can manually configure the deploymentId property in your next.config.js file to ensure each request uses either ?dpl query string or x-deployment-id header.

I looked at the docs for the config file (https://nextjs.org/docs/pages/api-reference/next-config-js), but I couldn't find where to put deploymentId.

Any suggestions? Thanks!

1 Reply

Sun bearOP
Oh wait, do I even need to specify my own deploymentId? Does NextJS dynamically set one if I don't set it myself?