Can't access environment variables in Wrangler dev
I've added environment variables in my CF dashboard. When running
There's some confusion around whether I need to define these locally (e.g. in a
Any insight?
wrangler dev I expect to be able to access these in a function (e.g. export async function onRequestGet(context) {console.log(context.env)}). However, the variable I've set in my CF dashboard is always undefined.There's some confusion around whether I need to define these locally (e.g. in a
.env file). I've tried this, but this also does not work. I'd prefer to NOT have to define them locally (similiar to the Netlify dev UX, where ones defined in the panel are available locally).Any insight?