Skip to content

Commit 0f523a9

Browse files
authored
[docs] update cloudflare adapter readmes (#2823)
1 parent be0bf3b commit 0f523a9

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

packages/adapter-cloudflare-workers/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ SvelteKit adapter that creates a Cloudflare Workers site using a function for dy
44

55
This is very experimental; the adapter API isn't at all fleshed out, and things will definitely change.
66

7+
_**Comparisons**_
8+
9+
- `adapter-cloudflare` – supports all SvelteKit features; builds for
10+
[Cloudflare Pages](https://blog.cloudflare.com/cloudflare-pages-goes-full-stack/)
11+
- `adapter-cloudflare-workers` – supports all SvelteKit features; builds for
12+
Cloudflare Workers
13+
- `adapter-static` – only produces client-side static assets; compatible with
14+
Cloudflare Pages
15+
16+
> **Note:** Cloudflare Pages' new Workers integration is currently in beta.<br/>
17+
> Compared to `adapter-cloudflare-workers`, this adapter will be the preferred approach for most users since building on top of Pages unlocks automatic builds and deploys, preview deployments, instant rollbacks, etc.<br/>
18+
> From SvelteKit's perspective, there is no difference and no functionality loss when migrating to/from the Workers and the Pages adapters.
19+
720
## Usage
821

922
Install with `npm i -D @sveltejs/adapter-cloudflare-workers@next`, then add the adapter to your `svelte.config.js`:

packages/adapter-cloudflare/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ _**Comparisons**_
1212
- `adapter-static` – only produces client-side static assets; compatible with
1313
Cloudflare Pages
1414

15+
> **Note:** Cloudflare Pages' new Workers integration is currently in beta.<br/>
16+
> Compared to `adapter-cloudflare-workers`, this adapter will be the preferred approach for most users since building on top of Pages unlocks automatic builds and deploys, preview deployments, instant rollbacks, etc.<br/>
17+
> From SvelteKit's perspective, there is no difference and no functionality loss when migrating to/from the Workers and the Pages adapters.
18+
1519
## Installation
1620

1721
```sh

packages/adapter-cloudflare/files/worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default {
2828
});
2929
}
3030
} catch (e) {
31-
return new Response('Error rendering route:' + (e.message || e.toString()), { status: 500 });
31+
return new Response('Error rendering route: ' + (e.message || e.toString()), { status: 500 });
3232
}
3333

3434
return new Response({

0 commit comments

Comments
 (0)