From fb39fb28331e5cd4d2650df35d8942e3e033d915 Mon Sep 17 00:00:00 2001 From: brandonsdebt <124833708+brandonsdebt@users.noreply.github.com> Date: Thu, 26 Oct 2023 12:51:04 +0200 Subject: [PATCH 1/2] Add compatibility with cloudflare node --- packages/integrations/react/server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } From 8e6a10d928c49e6958ee9a4c36cfa54fd483af77 Mon Sep 17 00:00:00 2001 From: Bjorn Lu Date: Tue, 14 Nov 2023 20:52:19 +0800 Subject: [PATCH 2/2] Create calm-ducks-divide.md --- .changeset/calm-ducks-divide.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/calm-ducks-divide.md 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