summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Richard Cooke <hello@richardcooke.io> 2022-06-16 21:16:25 +0100
committerGravatar GitHub <noreply@github.com> 2022-06-16 15:16:25 -0500
commit971674787988b5a0e868c0fe1c9518b593269f7a (patch)
treebefffa5d2d3f50677557e6622e8a98e9ecf69d6c
parent1c944a148a2d29d6bf907964c4617cad70528622 (diff)
downloadastro-971674787988b5a0e868c0fe1c9518b593269f7a.tar.gz
astro-971674787988b5a0e868c0fe1c9518b593269f7a.tar.zst
astro-971674787988b5a0e868c0fe1c9518b593269f7a.zip
feat: update `@astrojs/cloudflare` readme (#3616)
-rw-r--r--packages/integrations/cloudflare/README.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/packages/integrations/cloudflare/README.md b/packages/integrations/cloudflare/README.md
index 73064e821..a7f077dc4 100644
--- a/packages/integrations/cloudflare/README.md
+++ b/packages/integrations/cloudflare/README.md
@@ -22,3 +22,11 @@ $ pnpm install wrangler --save-dev
```
It's then possible to update the preview script in your `package.json` to `"preview": "wrangler pages dev ./dist"`
+
+## Streams
+
+Some integrations such as (react)[https://github.com/withastro/astro/tree/main/packages/integrations/react] rely on web streams. Currently Cloudflare Pages functions are in beta and don't support the `streams_enable_constructors` feature flag.
+
+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. \ No newline at end of file