A photo of Phil Hawksworth's face
Phil Hawksworth @philhawksworth replying to this from @djm_
@djm_ You could perhaps use build plugins for this. You could (re)move that file programatically before the build starts via the onPreBuild event.

Plugins are really handy for extending into the Netlify Build tooling.

https://docs.netlify.com/configure-builds/build-plugins/create-plugins/

My tweets and posts live here on my own domain these days.
You can explore them here and follow me on Mastodon instead of Twitter where I'm not currently active.