build-id
in Next.js
, we must configure a static ID between our builds. So, we have to provide the "generateBuildId
" function with the following configuration.// next.config.js
module.exports = {
generateBuildId: async () => {
// For example get the latest git commit hash here
return 'my-build-id';
}
};​