diff --git a/.changeset/curvy-onions-breathe.md b/.changeset/curvy-onions-breathe.md new file mode 100644 index 000000000000..7824d637564a --- /dev/null +++ b/.changeset/curvy-onions-breathe.md @@ -0,0 +1,5 @@ +--- +"wrangler": patch +--- + +fix: respect the options.local value in unstable_dev (it was being ignored) diff --git a/packages/wrangler/src/api/dev.ts b/packages/wrangler/src/api/dev.ts index 60648d6a1695..af2a729b349b 100644 --- a/packages/wrangler/src/api/dev.ts +++ b/packages/wrangler/src/api/dev.ts @@ -129,6 +129,7 @@ export async function unstable_dev( }); const defaultLogLevel = testMode ? "none" : "log"; + const local = options?.local ?? true; const devOptions: StartDevOptions = { script: script, @@ -137,8 +138,8 @@ export async function unstable_dev( _: [], $0: "", port: options?.port ?? 0, - remote: false, - local: undefined, + remote: !local, + local, experimentalLocal: undefined, d1Databases, disableDevRegistry,