Skip to content

Commit 4ebead9

Browse files
add changeset and disable remote bindings when localBindingsOnly is set
1 parent 2230f82 commit 4ebead9

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

.changeset/tangy-steaks-boil.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"wrangler": minor
3+
---
4+
5+
Add `localBindingsOnly` option to `startWorker` to disable remote bindings

packages/wrangler/src/api/startDevWorker/LocalRuntimeController.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,10 @@ export class LocalRuntimeController extends RuntimeController {
201201
try {
202202
const configBundle = await convertToConfigBundle(data);
203203

204-
if (data.config.dev?.remote !== false) {
204+
if (
205+
!data.config.dev.localBindingsOnly &&
206+
data.config.dev?.remote !== false
207+
) {
205208
// note: remote bindings use (transitively) LocalRuntimeController, so we need to import
206209
// from the module lazily in order to avoid circular dependency issues
207210
const { maybeStartOrUpdateRemoteProxySession, pickRemoteBindings } =

packages/wrangler/src/api/startDevWorker/MultiworkerRuntimeController.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ export class MultiworkerRuntimeController extends LocalRuntimeController {
112112
try {
113113
const configBundle = await convertToConfigBundle(data);
114114

115-
if (data.config.dev?.remote !== false) {
115+
if (
116+
!data.config.dev.localBindingsOnly &&
117+
data.config.dev?.remote !== false
118+
) {
116119
// note: remote bindings use (transitively) LocalRuntimeController, so we need to import
117120
// from the module lazily in order to avoid circular dependency issues
118121
const { maybeStartOrUpdateRemoteProxySession } = await import(

0 commit comments

Comments
 (0)