Tried Netlify functions again after three years and it’s a huge bummer this is something given no priority. I love Netlify for so many reasons, but this makes the functions feature feel not ready for the big time. I hit this issue (Figuring out if netlify-function is in a main env or production deploy) years go and ended up moving to Vercel.
That’s an unfortunate stance to take for something like this because it’s something that could easily be documented. People with more than 4kb can opt into to using the UI or resorting to sed
if needed. Moreover, even for that use case they’d still like to know what environment they’re targeting I’m sure. I use Netlify because of the branch deploys and branch based environments which is all but broken without nasty hacks.
Voicing this as one of the “few” to even the scales compared to the “many.”