How to run a pre-build processor?


as part of running wrangler publish, I would like to run a pre-build command specific to the worker (updating a json file)

I was thinking of using custom build command

command = npm run prebuild && the_default_esbuild

what is the default build command? how can I run the default esbuild command from my custom build?

alternatively, is there a way to run an additional command from the wrangler deploy?