Broad question on use case

I’ve watched the video and read Sarah’s post, and I just want to try to see if I get the use of this feature correctly.

Currently we can run a custom script in our build by specifying it in our settings.

This new feature is… more direct(not the best word I guess) in that I can associate a particular build event with a plugin. And I can more easily use a npm module for my logic.

Is this a fair summary?

Hi @cfjedimaster, thanks for reaching out.

Personally I would say Netlify Plugins are to Netlify what GitHub actions are to GitHub CI. So they are meant for logic that you want to share/distribute with other people, or for re-using Plugins from others. If the logic is private, then wrapping it in a Plugin is probably not useful.

Netlify build is designed to make it easier for devs to plug in bits of functionality to their build process.

It’s true that developers can string together npm scripts themselves to achieve some of this. However, npm scripts only run during the build phase of the CI. This means customizing what happens after a deployment is out, or how dependancies get installed etc.

The lifecycle is designed with programatic hooks for developers to wire up custom functionality to many parts of the build system, not just building the static site or web app.

The lifecycle hooks also allow things to happen before, after, during or completely override a specific step in the build flow

Cool, thank you both!

1 Like