Skip to content

Conversation

@alexanderniebuhr
Copy link
Member

@alexanderniebuhr alexanderniebuhr commented Dec 20, 2025

Changes

  • This PR removes official Cloudflare Pages support from the adapter
  • It keeps some of the workarounds in place, so users can still deploy to Pages with some configuration effort
    • build.client -> new URL(./, config.outDir)
    • build.server -> new URL('./_worker.js/', config.outDir)
    • _routes.json in public with whatever you need -> example in docs to route everything to the Worker, similar to sveltekit & nuxt
    • imageconfig to a supported one

Testing

  • unneeded test removed
  • existing test suite
  • manual testing
  • UPDATE added a test suite based on the vite-plugin test suite, but configured to deploy to pages.

Docs

/cc @withastro/maintainers-docs

@changeset-bot
Copy link

changeset-bot bot commented Dec 20, 2025

🦋 Changeset detected

Latest commit: d66d56b

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 Dec 20, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 20, 2025

⚠️ Package Trust Level Decreased

Caution

Decreased trust levels may indicate a higher risk of supply chain attacks. Please review these changes carefully.

📦 Package 🔒 Before 🔓 After
@cloudflare/kv-asset-handler trusted-with-provenance none
@cloudflare/unenv-preset trusted-with-provenance none
workerd trusted-with-provenance none
miniflare trusted-with-provenance none
youch provenance none
@cloudflare/workerd-darwin-64 trusted-with-provenance none
@cloudflare/workerd-darwin-arm64 trusted-with-provenance none
@cloudflare/workerd-linux-64 trusted-with-provenance none
@cloudflare/workerd-linux-arm64 trusted-with-provenance none
@cloudflare/workerd-windows-64 trusted-with-provenance none
wrangler trusted-with-provenance none

@ascorbic
Copy link
Contributor

Can we keep a fixture with manual Pages config?

@alexanderniebuhr
Copy link
Member Author

Can we keep a fixture with manual Pages config?

Sure I'll add one.

@alexanderniebuhr alexanderniebuhr marked this pull request as ready for review December 29, 2025 18:11
Comment on lines +13 to +17
build: {
inlineStylesheets: 'never',
client: './',
server: './_worker.js',
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this the required bit?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah the client & server settings are required.

	client: './',
	server: './_worker.js',

Copy link
Member Author

@alexanderniebuhr alexanderniebuhr Jan 9, 2026

Choose a reason for hiding this comment

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

And setting the image service to compile I think. I don't think pages has support for the cloudflare binding one.

@florian-lefebvre
Copy link
Member

@alexanderniebuhr I had a look locally and the reason it fails is because the file emitted is called index.mjs, not index.js. So that would need updating in changesets, fixture and tests

@alexanderniebuhr
Copy link
Member Author

alexanderniebuhr commented Jan 20, 2026

Interesting I wonder why I didn't have that locally before 🤔

@alexanderniebuhr
Copy link
Member Author

blocked by #15261

@alexanderniebuhr alexanderniebuhr force-pushed the drop-cf-pages branch 2 times, most recently from 9f4c8dd to 4d20667 Compare January 21, 2026 17:12
@alexanderniebuhr
Copy link
Member Author

cc @sarah11918 for changeset review

Copy link
Member

@florian-lefebvre florian-lefebvre left a comment

Choose a reason for hiding this comment

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

Code LGTM

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.

7 participants