@kpeacock thanks for the response. The problem is that I have a mono repo with multiple frontends relying on different build scripts. So I would like to be able to change the fact that dfx deploy executes npm run build and instead calls whatever script is defined in the build property of the canister definition in dfx.json. I’m currently solving this by building the frontends before calling dfx deploy and adding "build": "echo 'do nothing'" to the package.json to not clobber with my already build assets.
I agree it’s not the most elegant, and we do have a backlog item on allowing people to disable the npm run build invocation. I think your recommendation is a good way to accomplish that.
If you’re using npm workspaces, the differentiation between a "build": "" in the root package and proper build scripts in the workspaces should work out with
npm run build -> nothing npm run build --workspaces --if-present -> all build jobs run