Home
Support Forums

How to run my build plugins even when running in development w. `netlify dev`

I have a project with a single toml that looks like this to point to my locally created build plugin. The plugin works fine when i run netlify build but when I run netlify dev it looks like the plugin never gets run at all (i get no log output). I’m assuming that netlify build plugins only run during the build + deploy process. any way i can make sure it runs locally too? I’m ingesting some data from an api that’s necessary to build the application.

[build.environment]
  NODE_OPTIONS = "--max_old_space_size=4096"

[[redirects]]
  from = "..."
  to = "..."
  status = 301
  force = true

[[plugins]]
  package = "./netlify-plugins/load-statsig-config-into-env"

Plugins are run only during the building stage. This is because:

When using Netlify’s production build environment, you cannot run development servers, only production builds. Thus, to keep the CLI consistent with the production builds, the plugins are run only when running netlify build. I’m not sure if there are any technical limitations to this, but at the moment, that’s an expected behaviour.

If you think this should be implemented, could you file a feature request on the CLI repo?