---
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-08-05T05:00:50.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/db3c7ccc097c1c2396170c400408fdb298a74e0e-1800x1013_eSbAd.webp)

Tools & Services July 28, 2026

[

### MCP goes stateless and extensible

](/blog/mcp-goes-stateless-and-extensible)

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

![](/_astro/b581d6706ebcbd74591b67109365564968dbe81b-1800x1013_ZNneAB.webp)

Tools & Services July 27, 2026

[

### The 13-year story of Netlify Drop

](/blog/thirteen-years-of-netlify-drop)

-   ![Profile picture of Wade Wegner](/_astro/0302ff22eb844e648b11d7cff3cedbbc3c9de876-2667x4000_Z5j6wM.webp)
    
    Wade Wegner
    

## Recent posts

Opinions & Insights July 28, 2026

[

### Open Weights and the 2nd World

](/blog/open-weights-and-the-2nd-world)

-   ![Profile picture of Mathias Biilmann](/_astro/f193d4707a6391d843d5aaa73338b5a5971ec5cc-960x960_1Yylqm.webp)
    
    Mathias Biilmann
    

Tools & Services July 28, 2026

[

### MCP goes stateless and extensible

](/blog/mcp-goes-stateless-and-extensible)

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

News & Announcements July 28, 2026

[

### New Netlify projects are now private by default

](/blog/new-netlify-projects-are-now-private-by-default)

-   ![Profile picture of Taylor Barnett-Torabi](/_astro/cf4624da8c1286738397b6fecb53bad504df140b-400x400_ZsvK0s.webp)
    
    Taylor Barnett-Torabi
    

![](/_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/)