I recently ran into a similar issue (sharing resources between workers) and I believe the solution i
I recently ran into a similar issue (sharing resources between workers) and I believe the solution is to use
wrangler dev with multiple configuration files. wrangler dev can now run multiple workers at once and will save the state for each worker in the same .wrangler folder on disk - meaning if they point to the same D1 or KV resource (for example), they will point to the same data. The first wrangler.toml/wrangler.json(c) file is the "main" worker and will be the one that accepts the incoming HTTP requests. So you basically have to create a new worker that's used locally to help route to your other workers if you have multiple that need to accept incoming HTTP requests. The command you want will look something like this: wrangler dev -c ./dev-worker/wrangler.jsonc -c ./worker1/wrangler.jsonc -c ./worker2/wrangler.jsonc.