From a7ee68537840c6929b52be076b70d14057efd9c5 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Sun, 20 Jul 2025 09:25:57 +0200 Subject: message channel workaround --- astro.config.mjs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/astro.config.mjs b/astro.config.mjs index de70194..93f58d9 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -10,7 +10,14 @@ import cloudflare from '@astrojs/cloudflare'; // https://astro.build/config export default defineConfig({ vite: { - plugins: [tailwindcss()] + plugins: [tailwindcss()], + resolve: { + // Use react-dom/server.edge instead of react-dom/server.browser for React 19. + // Without this, MessageChannel from node:worker_threads needs to be polyfilled. + alias: import.meta.env.PROD ? { + "react-dom/server": "react-dom/server.edge", + } : undefined, + }, }, integrations: [react()], -- cgit v1.3.1