Skip to content

breaking: remove support for Cloudflare Pages - #16604

Draft
teemingc wants to merge 14 commits into
version-3from
breaking-remove-cloudflare-pages
Draft

breaking: remove support for Cloudflare Pages#16604
teemingc wants to merge 14 commits into
version-3from
breaking-remove-cloudflare-pages

Conversation

@teemingc

@teemingc teemingc commented Jul 31, 2026

Copy link
Copy Markdown
Member

closes #15060

We will eventually need to do this when Cloudflare officially sunsets Cloudflare Pages or when we add integration for the Cloudflare Vite plugin anyway. Doing it earlier will make the latter easier.

This PR:

  • removes the test app for cloudflare pages
  • changes the auto adapter to detect the Cloudflare Workers Builds environment instead
  • adds a check to the Cloudflare adapter to tell users to migrate to Cloudflare Workers

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

@pkg-svelte-dev

pkg-svelte-dev Bot commented Jul 31, 2026

Copy link
Copy Markdown

Install the latest version of @sveltejs/kit from f08b7bf:

pnpm add https://pkg.svelte.dev/@sveltejs/kit/c/f08b7bfce605303d53bab5a290489df6d639fdc3

Open in pkg.svelte.dev: https://pkg.svelte.dev/repos/kit/pr/16604

@changeset-bot

changeset-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f08b7bf

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

This PR includes changesets to release 2 packages
Name Type
@sveltejs/adapter-cloudflare Major
@sveltejs/adapter-auto Major

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

@teemingc teemingc changed the title breaking: remove support for cloudflare pages breaking: remove support for Cloudflare Pages Jul 31, 2026
@svelte-docs-bot

Copy link
Copy Markdown

Comment thread .changeset/eager-poets-battle.md Outdated
Comment thread packages/adapter-cloudflare/index.d.ts Outdated
// TODO: remove migration helper in a future major version
if (is_building_for_cloudflare_pages(wrangler_config)) {
throw new Error(
'@sveltejs/adapter-cloudflare no longer supports Cloudflare Pages. Please follow the migration guide to move your project to Cloudflare Workers https://developers.cloudflare.com/workers/static-assets/migration-guides/migrate-from-pages/'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
'@sveltejs/adapter-cloudflare no longer supports Cloudflare Pages. Please follow the migration guide to move your project to Cloudflare Workers https://developers.cloudflare.com/workers/static-assets/migration-guides/migrate-from-pages/'
'@sveltejs/adapter-cloudflare no longer supports Cloudflare Pages. Please follow the migration guide to move your project to Cloudflare Workers https://developers.cloudflare.com/workers/static-assets/migration-guides/migrate-from-pages/ If you have already migrated, delete the leftover `_routes.json` file from your project root.'

for people who migrated but kept a stale _routes.json

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Comment thread packages/adapter-cloudflare/index.js Outdated
Comment thread packages/adapter-cloudflare/utils.js Outdated
teemingc and others added 2 commits August 2, 2026 07:27
Co-authored-by: Nic Polumeyv <nicolas.polum@outlook.com>
Co-authored-by: Nic Polumeyv <nicolas.polum@outlook.com>
@teemingc teemingc added this to the 3.x milestone Aug 3, 2026

@Rich-Harris Rich-Harris left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

blocking so we don't accidentally merge before the v3 release, as we decided it would be kind to give people a minute to migrate

Nic-Polumeyv and others added 2 commits August 11, 2026 16:32
Stacked on #16604. Picks up the leftovers and adds a test for the new
`_routes.json` check.

---

### Please don't delete this checklist! Before submitting the PR, please
make sure you do the following:
- [x] It's really useful if your PR references an issue where it is
discussed ahead of time. In many cases, features are absent for a
reason. For large changes, please create an RFC:
https://github.com/sveltejs/rfcs
- [x] This message body should clearly illustrate what problems it
solves.
- [x] Ideally, include a test that fails without this PR but passes with
it.

### Tests
- [ ] Run the tests with `pnpm test` and lint the project with `pnpm
lint` and `pnpm check`

### Changesets
- [x] If your PR makes a change that should be noted in one or more
packages' changelogs, generate a changeset by running `pnpm changeset`
and following the prompts. Changesets that add features should be
`minor` and those that fix bugs should be `patch`. Please prefix
changeset messages with `feat:`, `fix:`, or `chore:`.

### Edits

- [x] Please ensure that 'Allow edits from maintainers' is checked. PRs
without this option may be closed.
Co-authored-by: Nic Polumeyv <nicolas.polum@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@sveltejs/adapter-auto not detecting Cloudflare Workers

3 participants