feat: update @astrojs/cloudflare
readme (#3616)
This commit is contained in:
parent
1c944a148a
commit
9716747879
1 changed files with 8 additions and 0 deletions
|
@ -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.
|
Loading…
Reference in a new issue