Google News
logo
Next.js - Interview Questions
How can you configure the build-id in Next.js?
To configure the 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.
 
Syntax :
// next.config.js  
module.exports = {  
   generateBuildId: async () => {  
  // For example get the latest git commit hash here  
  return 'my-build-id';  
  }  
};​
   
Advertisement