---
title: "Do More at Build Time with Build Plugins"
description: "You can’t buy time but you can make the most of it by automating tasks during build time with Netlify Build Plugins."
source: "https://www.netlify.com/blog/2021/12/27/do-more-at-build-time-with-build-plugins/"
last_updated: "2026-07-11T02:44:38.000Z"
---
> Throughout December we’ll be [highlighting a different Netlify feature each day](https://www.netlify.com/blog/2021/12/01/highlighting-a-different-netlify-feature-each-day-in-december/?utm_campaign=featdaily21&utm_source=netlify&utm_medium=blog&utm_content=build-plugins). It might just be the thing you need to unlock those creative juices, and [dust off that domain](https://www.netlify.com/blog/2021/12/01/dusty-domains-your-forgotten-domains-raise-money-for-charity/?utm_campaign=featdaily21&utm_source=netlify&utm_medium=blog&utm_content=build-plugins) you registered but never deployed! Keep an eye [on the blog](https://www.netlify.com/blog/2021/12/01/highlighting-a-different-netlify-feature-each-day-in-december/?utm_campaign=featdaily21&utm_source=netlify&utm_medium=blog&utm_content=build-plugins) and on [Twitter](https://twitter.com/netlify) for each feature!

On engineering teams and in life, in general, time tends to be the most valuable yet least plentiful resource. Since [studies have proven that us humans cannot multitask](https://hbr.org/2010/12/you-cant-multi-task-so-stop-tr), we must find another way to do many things at once. May I introduce [build plugins](https://www.netlify.com/integrations/).

Build plugins are little utilities that you can install [through your project dashboard](https://app.netlify.com/plugins) that help with caching, optimizations, security, and a ton more. So when you run your build it can run your tests while you run to get lunch. Yay, more things at once! You can check out the whole list [in the plugins dashboard](https://app.netlify.com/plugins).

![](/v3/img/blog/screen-shot-2021-12-28-at-10.49.08-am.png)

## Customize Your Workflow

Can you think of some tedious task that you have to take on _every time_ you deploy? Have to check your Lighthouse score, optimize images, run Cypress end-to-end tests? Well, there _are_ build plugins for that BUT what if there wasn’t 😱?! No worries, you can spin up your own 🥳.

There are two parts to a Build Plugin: the `.yml` file for the plugins meta data and any `.js` files you need to make it do what you need. Then you can pull it into your projects with your `netlify.toml` configuration file. With plugins you can add functionality to each part of the build processes:

-   **`onPreBuild`**: runs before the build command is executed.
-   **`onBuild`**: runs directly after the build command is executed and before Functions bundling and Edge Handlers bundling.
-   **`onPostBuild`**: runs after the build command completes; after onBuild tasks, Functions bundling, and Edge Handlers bundling are executed; and before the deploy stage. Can be used to prevent a build from being deployed.
-   **`onError`**: runs when an error occurs in the build or deploy stage, failing the build. Can’t be used to prevent a build from being deployed.
-   **`onSuccess`**: runs when the deploy succeeds. Can’t be used to prevent a build from being deployed.
-   **`onEnd`**: runs after completion of the deploy stage, regardless of build error or success; is useful for resources cleanup. Can’t be used to prevent a build from being deployed.

Learn more about [creating your own Build Plugins](https://docs.netlify.com/configure-builds/build-plugins/create-plugins) in our documentation. Happy coding 👩🏻‍💻!

### Resources for the Road

-   [Netlify Build Plugin Documentation](https://docs.netlify.com/configure-builds/build-plugins/)
-   [One-click install Build Plugins](https://app.netlify.com/plugins)
-   [Creating Build Plugins](https://docs.netlify.com/configure-builds/build-plugins/create-plugins)
-   [Top Ten Build Plugins](https://www.netlify.com/blog/2021/01/25/top-10-netlify-build-plugins-2021-update/)
-   [Many more blog posts on Build Plugins!](https://www.netlify.com/blog/tags/build-plugins/)

### Share

-   [X (fka Twitter)](https://twitter.com/intent/tweet?text= Do More at Build Time with Build Plugins&url=https://www.netlify.com/blog/2021/12/27/do-more-at-build-time-with-build-plugins/)
-   [LinkedIn](https://www.linkedin.com/shareArticle?mini=true&url=https%3A%2F%2Fwww.netlify.com%2Fblog%2F2021%2F12%2F27%2Fdo-more-at-build-time-with-build-plugins%2F)
-   [Facebook](https://www.facebook.com/sharer.php?u=https://www.netlify.com/blog/2021/12/27/do-more-at-build-time-with-build-plugins/)
-   [Bluesky](https://bsky.app/intent/compose?text= Do More at Build Time with Build Plugins+https://www.netlify.com/blog/2021/12/27/do-more-at-build-time-with-build-plugins/)

* * *

### Tags

-   [Build Plugins](/blog/tags/build-plugins/)

## Keep reading

![](/_astro/bbe3cfe0b5d5228f5d0a66e26ce057de315c7712-1200x675_ZQfk21.webp)

Tools & Services December 3, 2025

[

### Vibe coding to production with Kiro powers

](/blog/vibe-coding-production-kiro-powers)

-   ![Profile picture of Gehrig Kunz](/_astro/b4e9f58d914d1334ea70d53ea55a1f26b26f1445-512x512_17SwOI.webp)
    
    Gehrig Kunz
    

![](/_astro/b596a7453ede5fe6739bd12506636fe522828198-2400x1351_1ANtEG.webp)

Tools & Services February 21, 2025

[

### Secure local development with Codezero for Netlify

](/blog/secure-local-development-codezero)

-   Kathleen Randall
    

## Recent posts

News & Announcements June 25, 2026

[

### Netlify Functions, designed for Agent Experience

](/blog/netlify-functions-designed-for-agent-experience)

-   ![Profile picture of Eduardo Bouças](/_astro/52958f21e8450baf6d8e60302341a984e220c0cd-512x512_13VDlu.webp)
    
    Eduardo Bouças
    

News & Announcements June 24, 2026

[

### How we measure Netlify’s Agent Experience

](/blog/how-we-measure-netlify-agent-experience)

-   ![Profile picture of Sean Roberts](/_astro/bbf2243f8171dbddd80ab2103622106cef84d125-512x512_Z1d2LKE.webp)
    
    Sean Roberts
    

Guides & Tutorials May 15, 2026

[

### How to build a real-time AI chatbot in minutes with Netlify Agent Runners (no backend)

](/blog/how-to-build-a-real-time-ai-chatbot-in-minutes-with-netlify-agent-runners-no-backend)

-   ![Profile picture of Nahrin Jalal](/_astro/f0e7c8f227a03fe58340c99ef5439d5a896c0733-272x272_Z23kDpD.webp)
    
    Nahrin Jalal
    

![](/_astro/3f255b372fa958df35802666ee33b4609b2d71bd-1200x1586_1VtE2D.webp)

### How do the best dev and marketing teams work together?

[Access the report](https://www.netlify.com/reports/2024-leadership-trend-report/access/)