diff options
| author | Yuval Adam <_@yuv.al> | 2025-07-20 09:25:57 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2025-07-20 09:26:38 +0200 |
| commit | a7ee68537840c6929b52be076b70d14057efd9c5 (patch) | |
| tree | 9a4a055c11c99d6e688fcecceb40047e2cc0f79d /astro.config.mjs | |
| parent | ee1a980de69c2e82f06872d8edf023cd1e99feb6 (diff) | |
message channel workaround
Diffstat (limited to 'astro.config.mjs')
| -rw-r--r-- | astro.config.mjs | 9 |
1 files changed, 8 insertions, 1 deletions
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()], |
