How do I enable an esbuild plugin to be used during a function build?

My lambda function works fine and is building using esbuild now, but I want to enable an esbuild plugin to be used during the function build. Is there a config file I can create (such as build.js) or an option I can enable to setup the esbuild parameters used during the building of a netlify function?

Hi @amberd,

That’s currently not possible. However, you can either:

  1. Build your function’s JavaScript using esbuild locally with the plugins that you want. Then deploy that generated JS file as a function. OR
  2. Create a build plugin that basically does the same thing.