diff options
author | 2022-10-25 10:27:39 -0400 | |
---|---|---|
committer | 2022-10-25 10:27:39 -0400 | |
commit | a3d8615937515cc39c56677dd988a93a5232c0cb (patch) | |
tree | 5eee6bd4764784cd44e2b084b32f12fec62b227f | |
parent | 13b8e787134e72192ffd32381d26d0c9748ad02a (diff) | |
download | astro-a3d8615937515cc39c56677dd988a93a5232c0cb.tar.gz astro-a3d8615937515cc39c56677dd988a93a5232c0cb.tar.zst astro-a3d8615937515cc39c56677dd988a93a5232c0cb.zip |
Added information about Pages flags (#5188)
-rw-r--r-- | packages/integrations/cloudflare/README.md | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/packages/integrations/cloudflare/README.md b/packages/integrations/cloudflare/README.md index 80d7808ae..755451185 100644 --- a/packages/integrations/cloudflare/README.md +++ b/packages/integrations/cloudflare/README.md @@ -70,11 +70,13 @@ It's then possible to update the preview script in your `package.json` to `"prev ## 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. +Some integrations such as [React](https://github.com/withastro/astro/tree/main/packages/integrations/react) rely on web streams. Currently Cloudflare Pages Functions require enabling a flag to support Streams. -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. +To do this: +- go to the Cloudflare Pages project +- click on Settings in the top bar, then Functions in the sidebar +- scroll down to Compatibility Flags, click Configure Production Compatibility Flags, and add `streams_enable_constructors` +- do this for both the Production Compatibility Flags and Preview Compatibility Flags ## Environment Variables |