diff --git a/packages/waku/src/lib/builder/serve-cloudflare.ts b/packages/waku/src/lib/builder/serve-cloudflare.ts index 4555b626a..013d8bea5 100644 --- a/packages/waku/src/lib/builder/serve-cloudflare.ts +++ b/packages/waku/src/lib/builder/serve-cloudflare.ts @@ -34,7 +34,12 @@ export default { ctx: Parameters[2], ) { if (!serveWaku) { - serveWaku = runner({ cmd: 'start', loadEntries, env }); + serveWaku = runner({ + cmd: 'start', + loadEntries, + // @ts-expect-error Pass the execution context to server components via env + env: { ...(ctx ? { ctx } : {}), ...env }, + }); } return app.fetch(request, env, ctx); },