feat: deprecate adapter-cloudflare-workers in favour of adapter-cloudflare#13634
feat: deprecate adapter-cloudflare-workers in favour of adapter-cloudflare#13634
adapter-cloudflare-workers in favour of adapter-cloudflare#13634Conversation
🦋 Changeset detectedLatest commit: 49d28e8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
dario-piotrowicz
left a comment
There was a problem hiding this comment.
Great stuff! I love seeing a single adapter that chooses workers or pages for you based on the config file! 🫶
documentation/docs/25-build-and-deploy/60-adapter-cloudflare.md
Outdated
Show resolved
Hide resolved
documentation/docs/25-build-and-deploy/60-adapter-cloudflare.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
|
Thanks for the feedback guys. I've updated the docs and also bumped the minimum Wrangler version to v4. I've also updated the fallback option to work with Cloudflare Workers if the user has configured the assets 404-handling option. EDIT: I've also added some simple tests to check that the build output is successful and works with the pages/workers dev environment provided by wrangler. |
…oudflare` (sveltejs#13634) * merge adapters * changeset * it's valid to not specify a main entry if the user is only deploying static assets * format * adjust docs * also use cf pages env var * fix migration guide link * try to fix doc build error * Update index.d.ts Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> * Update kind-carrots-deliver.md Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> * validate assets key if main key is set * delete adapter-cloudflare-workers * adjust docs and workspace for removing cloudflare workers * fix docs title * clarify _routes.json belongs to cloudflare pages * Update packages/adapter-cloudflare/src/worker.js Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com> * changes according to feedback * revert type change * fix lock file * fixes * tests * fix lockfile * format --------- Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
an alternative that closes #13427
closes #13360
closes #13071
closes #13005
closes #12813
closes #13579
closes #10924
This PR adds a deprecation notice to the
adapter-cloudflare-workersdocs while adding support for Cloudflare Workers Static Assets by skipping Cloudflare Pages-specific build steps and respecting Wrangler configuration settings if building for Cloudflare Workers Static Assets.We use a heuristic to guess whether we're building for Cloudflare Pages or Workers based on the Wrangler configuration file settings, but even if there is no Wrangler configuration file, the build output is compatible with both platforms.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits