diff --git a/.changeset/modern-papayas-rhyme.md b/.changeset/modern-papayas-rhyme.md new file mode 100644 index 0000000000..f6751130c4 --- /dev/null +++ b/.changeset/modern-papayas-rhyme.md @@ -0,0 +1,5 @@ +--- +"@astrojs/cloudflare": patch +--- + +Update README diff --git a/packages/integrations/cloudflare/README.md b/packages/integrations/cloudflare/README.md index 1bd65f5aed..2ca3bfac5e 100644 --- a/packages/integrations/cloudflare/README.md +++ b/packages/integrations/cloudflare/README.md @@ -27,7 +27,7 @@ Cloudflare Pages has 2 different modes for deploying functions, `advanced` mode For most projects the adaptor default of `advanced` will be sufficiant, when in this mode the `dist` folder will contain your compiled project. However if you'd like to use [pages plugins](https://developers.cloudflare.com/pages/platform/functions/plugins/) such as [Sentry](https://developers.cloudflare.com/pages/platform/functions/plugins/sentry/) for example to enable logging, you'll need to use directory mode. -In directory mode the adaptor will compile the client side part of you app the same way, but it will move the worker script into a `functions` folder in the project root. The adaptor will only ever place a `[[path]].js` in that folder, allowing you to add additional plugins and pages middlewhere which can be checked into version control . +In directory mode the adaptor will compile the client side part of you app the same way, but it will move the worker script into a `functions` folder in the project root. The adaptor will only ever place a `[[path]].js` in that folder, allowing you to add additional plugins and pages middleware which can be checked into version control. ```ts // directory mode @@ -45,7 +45,7 @@ In order for preview to work you must install `wrangler` $ pnpm install wrangler --save-dev ``` -It's then possible to update the preview script in your `package.json` to `"preview": "wrangler pages dev ./dist"` +It's then possible to update the preview script in your `package.json` to `"preview": "wrangler pages dev ./dist"`.This will allow you run your entire application locally with [Wrangler](https://github.com/cloudflare/wrangler2), which supports secrets, environment variables, KV namespaces, Durable Objects and [all other supported Cloudflare bindings](https://developers.cloudflare.com/pages/platform/functions/#adding-bindings). ## Streams @@ -54,3 +54,4 @@ Some integrations such as [React](https://github.com/withastro/astro/tree/main/p In order to work around this: - install the `"web-streams-polyfill"` package - add `import "web-streams-polyfill/es2018";` to the top of the front matter of every page which requires streams, such as server rendering a React component. +