Skip to content

fix(cloudflare): prebundle SSR deps for Starlight + Cloudflare dev#15815

Merged
matthewp merged 5 commits intomainfrom
fix/cloudflare-starlight-dev-optimize-deps
Mar 11, 2026
Merged

fix(cloudflare): prebundle SSR deps for Starlight + Cloudflare dev#15815
matthewp merged 5 commits intomainfrom
fix/cloudflare-starlight-dev-optimize-deps

Conversation

@matthewp
Copy link
Copy Markdown
Contributor

@matthewp matthewp commented Mar 9, 2026

Note, I don't love that we need to do this so much. I think we need to figure out an API so that plugins that need this can do it themselves, rather than having them all here.

Have an idea for that I'm going to propose as a minor change.

Summary

  • Add Cloudflare adapter SSR optimizeDeps.include entries for Astro runtime modules that are discovered on first request in Workers dev.
  • This avoids repeated mid-request SSR dep discovery reloads that can invalidate Workers request context and cause first-load hangs.
  • This is necessary to get Starlight + Cloudflare working reliably in dev from a cold Vite optimizer cache.

Testing

  • Manually testing Starlights docs site

Docs

N/A, bug fix

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 9, 2026

🦋 Changeset detected

Latest commit: b179b1a

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 Mar 9, 2026
@matthewp matthewp mentioned this pull request Mar 9, 2026
10 tasks
@matthewp matthewp merged commit d1872ee into main Mar 11, 2026
21 checks passed
@matthewp matthewp deleted the fix/cloudflare-starlight-dev-optimize-deps branch March 11, 2026 20:24
@astrobot-houston astrobot-houston mentioned this pull request Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: integration Related to any renderer integration (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants