Build Plugins Add Lifecycle Hooks to Netlify Deploys

Netlify announced Build Plugins at Jamstack_Conf, giving developers programmatic control over key moments in the build process. Plugins hook into events such as when a build starts or finishes, letting you run custom logic at those precise points.

A Netlify build happens whenever you connect a repository from GitHub, GitLab, or another provider — or when you manually upload a directory. Netlify processes the assets, installs dependencies, and generates a static version of the site for distribution across its global CDN. Build Plugins expose checkpoints during this flow: onPreBuild, onPostBuild, onSuccess, and others. At each event you can execute your own logic, like kicking off a library or script you'd normally run inside your app. Plugins are just plain JavaScript objects:

module.exports = {
  onPreBuild: () => {
    console.log('Hello world from onPreBuild event!')
  },
}

Existing Plugins Cover Testing, Accessibility, and Performance

You're not limited to writing your own. The community has already published a variety of plugins that can be enabled directly from the Netlify dashboard with a few clicks:

For full details, see the official announcement post.