Open Ehesp opened 1 year ago
Ah this might be what I'm looking for: https://github.com/cloudflare/miniflare/issues/116
I'll give it a try and see if it solves the issue.
EDIT: Ah no, this isn't the same. This still expects a --env
flag in the wrangler command vs being automatic.
Describe the solution
Given the following, where there's a custom build flow:
I'd like to be able to detect whether
wrangler dev
orwrangler publish
has triggered the command, as to do some custom logic in the build command. As far as I can see, it is not possible to detect this at all.I also tried defining
.dev.vars
but it seems this is loaded after the custom build command, so I can't use that to detect the environment.