Hey! I’m glad you’ve found a suitable workaround for now. In code, you may even be able to use a simple if statement to check for your build context:
const context = process.env.CONTEXT
if (context === [...]
For reference, here’s one way using build plugins to contextualise environment variables (which discusses the above code extract in more detail too! Furthermore, here’s our general guide on using env vars correctly with a heap of suggestions in the comments.