Skip to content

Strip durable_objects, migrations, and workflows from the Cloudflare prerender worker config - #17914

Merged
matthewp merged 1 commit into
mainfrom
factory/fix-17913
Sep 5, 2026
Merged

matthewp merged 1 commit into
mainfrom
factory/fix-17913

Conversation

@astro-factory

@astro-factory astro-factory Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Changes

  • Durable Object bindings declared in the user's wrangler config were being copied into the prerender worker config, but the prerender worker's main is overridden to @astrojs/cloudflare/entrypoints/server, which does not export the user's DO classes. Miniflare's DO wrapper then tried to extend undefined, crashing the prerender worker at build time.
  • Extends the existing queues destructuring (introduced in fix(cloudflare): exclude queue consumers from prerender worker #16225 for the same reason) to also strip durable_objects, migrations, and workflows before spreading entryWorkerConfig into the prerender worker config, keeping bindings and class exports consistent.

Testing

  • Adds packages/integrations/cloudflare/test/prerender-durable-object.test.ts, a unit test that builds a static site whose custom worker entrypoint exports a Durable Object and verifies the prerender step completes without a runtime failure.

Docs

  • No docs update needed; this is a bug fix for an internal build-time configuration detail with no user-facing API change.

Closes #17913

@changeset-bot

changeset-bot Bot commented Sep 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9e85ffe

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions Bot added the pkg: integration Related to any renderer integration (scope) label Sep 5, 2026
@matthewp
matthewp merged commit a400504 into main Sep 5, 2026
45 of 46 checks passed
@matthewp
matthewp deleted the factory/fix-17913 branch September 5, 2026 16:48
@n3dst4

n3dst4 commented Sep 5, 2026

Copy link
Copy Markdown

Thank you!

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

Labels

fix verified Reporter confirmed the triage bot fix works pkg: integration Related to any renderer integration (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cloudflare 14.3.0: prerender worker loses custom Durable Object exports and fails to start

2 participants