diff --git a/.changeset/calm-ducks-divide.md b/.changeset/calm-ducks-divide.md new file mode 100644 index 000000000000..1cacaaf5a79c --- /dev/null +++ b/.changeset/calm-ducks-divide.md @@ -0,0 +1,5 @@ +--- +"@astrojs/react": patch +--- + +Uses `node:stream` during server rendering for compatibility with Cloudflare diff --git a/packages/integrations/react/server.js b/packages/integrations/react/server.js index 26596289eb8c..05ee66c6a817 100644 --- a/packages/integrations/react/server.js +++ b/packages/integrations/react/server.js @@ -53,7 +53,7 @@ async function check(Component, props, children) { } async function getNodeWritable() { - let nodeStreamBuiltinModuleName = 'stream'; + let nodeStreamBuiltinModuleName = 'node:stream'; let { Writable } = await import(/* @vite-ignore */ nodeStreamBuiltinModuleName); return Writable; }