diff --git a/.changeset/fix-flagship-remote-entrypoint.md b/.changeset/fix-flagship-remote-entrypoint.md new file mode 100644 index 0000000000..4172061590 --- /dev/null +++ b/.changeset/fix-flagship-remote-entrypoint.md @@ -0,0 +1,7 @@ +--- +"miniflare": patch +--- + +Fix `wrangler dev` crash when using a Flagship binding with `remote: true` + +In remote mode, the flagship binding is backed by a generic proxy worker that only has a default export. The plugin was requesting a named entrypoint `"FlagshipBinding"` which doesn't exist on it, causing workerd to reject the binding at startup. The named entrypoint is now omitted in remote mode so workerd routes to the default export, which correctly proxies all RPC calls to the remote Flagship service. diff --git a/packages/miniflare/src/plugins/flagship/index.ts b/packages/miniflare/src/plugins/flagship/index.ts index b675bf6bb8..e03dd282d6 100644 --- a/packages/miniflare/src/plugins/flagship/index.ts +++ b/packages/miniflare/src/plugins/flagship/index.ts @@ -37,7 +37,9 @@ export const FLAGSHIP_PLUGIN: Plugin = { name, config.remoteProxyConnectionString ), - entrypoint: "FlagshipBinding", + entrypoint: config.remoteProxyConnectionString + ? undefined + : "FlagshipBinding", }, }) );