Skip to content

feat(astro): update Cloudflare support for Astro 6#1358

Open
AmanVarshney01 wants to merge 4 commits into
mainfrom
aman/astro6-cloudflare
Open

feat(astro): update Cloudflare support for Astro 6#1358
AmanVarshney01 wants to merge 4 commits into
mainfrom
aman/astro6-cloudflare

Conversation

@AmanVarshney01

Copy link
Copy Markdown
Collaborator

Updates Alchemy's Astro Cloudflare support to match Astro 6 output and adapter conventions.

Changes

  • switch Astro Cloudflare server defaults to dist/server/entry.mjs
  • switch Astro Cloudflare assets defaults to dist/client
  • update Astro package support to Astro 6 and @astrojs/cloudflare 13
  • update the Astro template package versions and Wrangler template paths
  • normalize the Astro plugin's local Cloudflare proxy config for the v13 adapter API

@pkg-pr-new

pkg-pr-new Bot commented Mar 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/alchemy@1358

commit: cebe513

@Mkassabov Mkassabov left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this also update the cloudflare-astro example?

Comment thread examples/cloudflare-astro/package.json Outdated
props.entrypoint ??
(output === "server" ? "dist/_worker.js/index.js" : undefined),
assets: props.assets ?? "dist",
(output === "server" ? "dist/server/entry.mjs" : undefined),

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it still work for older astro?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this would break Astro 5.

Astro 5 still outputs:

dist/_worker.js/index.js

I’m not sure we can reliably infer v5 vs v6 inside the resource

I thinkmaybe we just update the docs?

keep these defaults aligned to Astro 6
document the Astro 5 override explicitly

Something like:

await Astro("website", {
  entrypoint: "dist/_worker.js/index.js",
  assets: "dist",
  wrangler: {
    main: "@astrojs/cloudflare/entrypoints/server.js",
  },
});

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe a version prop? we default to astroVersion: 5 so we don't break it for existing users and anyone who wants to use astro 6 would explicitly say astroVersion: 6.

or we just version the entire resource but that feels like overkill. We should really avoid breaking userspace

@jcheese1

jcheese1 commented Apr 5, 2026

Copy link
Copy Markdown

upvote this

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.

5 participants