Skip to content

feat(cloudflare-durable): add durable.bindingName config#3876

Open
onmax wants to merge 1 commit intonitrojs:v2from
onmax:feat/durable-binding-name-v2
Open

feat(cloudflare-durable): add durable.bindingName config#3876
onmax wants to merge 1 commit intonitrojs:v2from
onmax:feat/durable-binding-name-v2

Conversation

@onmax
Copy link
Contributor

@onmax onmax commented Dec 16, 2025

Summary

Backport of #3875 for v2 branch.

Adds cloudflare.durable.bindingName config option to customize the Durable Object binding name used by defineWebSocketHandler.

  • Default: $DurableObject (backwards compatible)
  • Custom name is injected via import.meta._durableBindingName
  • Auto-generates durable_objects.bindings in wrangler.json when deployConfig: true

Usage

export default defineNuxtConfig({
  nitro: {
    preset: 'cloudflare-durable',
    cloudflare: {
      deployConfig: true,
      durable: { bindingName: 'MyDO' }
    }
  }
})

Repro

https://github.com/onmax/repros/tree/main/nitro-3378

Related: #3378

@onmax onmax requested a review from pi0 as a code owner December 16, 2025 07:33
@vercel
Copy link

vercel bot commented Dec 16, 2025

@onmax is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Dec 16, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant