Hi, just trying to follow the Workers for Platforms example but having trouble getting dispatch_name

Hi, just trying to follow the Workers for Platforms example but having trouble getting dispatch_namespaces to work. in my wrangler.jsonc:
"vars": {
  "MY_VARIABLE": "production_value",
},

"dispatch_namespaces": [
  {
    "binding": "DISPATCHER",
    "namespace": "<NAMESPACE_NAME>",
  },
],

But when i run wrangler dev with:
export default {
  async fetch(req, env) {
    console.log('env:', Object.keys(env));

I see logged:
env: [ 'MY_VARIABLE' ]

Why do does "vars" modify env but "dispatch_namespaces" doesn't?
Was this page helpful?