Skip to content

Conversation

@penalosa
Copy link

@penalosa penalosa commented Oct 31, 2025

The SvelteKit auto adapter only checks for CF_PAGES before using the Cloudflare adapter. Instead, it should check for CF_PAGES and WORKERS_CI, since the Cloudflare adapter supports both Workers and Pages .


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.

@changeset-bot
Copy link

changeset-bot bot commented Oct 31, 2025

🦋 Changeset detected

Latest commit: 39af0a2

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 Patch
@sveltejs/adapter-auto Minor

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

@penalosa
Copy link
Author

Happy to add a test here, but there don't seem to be any relevant existing tests for the auto adapter, so I wasn't sure where the best place to add it would be.

@ghostdevv
Copy link
Member

Looks to be a somewhat duplicate of #13733 cc: @teemingc

@penalosa
Copy link
Author

Looks to be a somewhat duplicate of #13733 cc: @teemingc

Huh, it looks like that PR is a bit stalled—do you know why? I'd be happy to pick it up and get it over the line (for context, I work on the Workers team at Cloudflare)

@teemingc
Copy link
Member

teemingc commented Nov 3, 2025

Looks to be a somewhat duplicate of #13733 cc: @teemingc

Huh, it looks like that PR is a bit stalled—do you know why? I'd be happy to pick it up and get it over the line (for context, I work on the Workers team at Cloudflare)

Hi Somhairle, I had some thoughts in #13733 (comment) but basically, we weren't sure how the auto adapter would work if the build would always fail without a properly configured wrangler.jsonc file. At that point, it might make more sense for the user to install the Cloudflare adapter directly.

Otherwise, the package.json changes in this PR look useful.

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.

5 participants