Skip to content

Commit df614bf

Browse files
authored
[Workers] changelog for wrangler dev multi config cross command support (#24551)
1 parent 75f45e7 commit df614bf

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: Improved support for running multiple Workers with `wrangler dev`
3+
description: Workers running with wrangler dev using multiple config files can now communicate with Workers running in separate dev commands.
4+
products:
5+
- workers
6+
date: 2025-09-23
7+
---
8+
9+
You can run multiple Workers in a single dev command by passing multiple config files to `wrangler dev`:
10+
11+
```sh
12+
wrangler dev --config ./web/wrangler.jsonc --config ./api/wrangler.jsonc
13+
```
14+
15+
Previously, if you ran the command above and then also ran wrangler dev for a different Worker, the Workers running in separate wrangler dev sessions could not communicate with each other. This prevented you from being able to use [Service Bindings](https://developers.cloudflare.com/workers/runtime-apis/bindings/service-bindings/) and [Tail Workers](https://developers.cloudflare.com/workers/observability/logs/tail-workers/) in local development, when running separate wrangler dev sessions.
16+
17+
Now, the following works as expected:
18+
19+
```sh
20+
# Terminal 1: Run your application that includes both Web and API workers
21+
wrangler dev --config ./web/wrangler.jsonc --config ./api/wrangler.jsonc
22+
23+
# Terminal 2: Run your auth worker separately
24+
wrangler dev --config ./auth/wrangler.jsonc
25+
```
26+
27+
These Workers can now communicate with each other across separate dev commands, regardless of your development setup.
28+
29+
```js title="./api/src/index.ts"
30+
export default {
31+
async fetch(request, env) {
32+
// This service binding call now works across dev commands
33+
const authorized = await env.AUTH.isAuthorized(request);
34+
35+
if (!authorized) {
36+
return new Response('Unauthorized', { status: 401 });
37+
}
38+
39+
return new Response('Hello from API Worker!', { status: 200 });
40+
},
41+
};
42+
```
43+
44+
Check out the [Developing with multiple Workers](/workers/development-testing/multi-workers) guide to learn more about the different approaches and when to use each one.

0 commit comments

Comments
 (0)