secrets: `.env.SECRET_NAME` or `context.env.SECRET_NAME`

I have a .dev.varslocally with some secrets, and Wrangler is telling me they're available, however in my worker I've tried both ${env.SECRET_NAME} and {context.env.SECRET_NAME}, neither of which is resolving.

Does anyone know what might be the issue? Since the documentation mentions both approaches, I am suspicious that either might be incorrect.
Was this page helpful?