diff options
| author | Yuval Adam <_@yuv.al> | 2025-06-27 10:18:42 +0200 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2025-06-27 10:18:42 +0200 |
| commit | f0469417255674b9872480493953674965c5ba99 (patch) | |
| tree | 37d8811fa399dde5da902c624987f4c78b93d29a /astro.config.mjs | |
| parent | 2ad5ce929f6d69c9aaca71573744b30e02ab8bed (diff) | |
Set static build by default and fix react workaround
Diffstat (limited to 'astro.config.mjs')
| -rw-r--r-- | astro.config.mjs | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/astro.config.mjs b/astro.config.mjs index cc75542..03d6a57 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -6,17 +6,25 @@ import cloudflare from '@astrojs/cloudflare'; // https://astro.build/config export default defineConfig({ - output: 'server', + output: 'static', adapter: cloudflare({ platformProxy: { enabled: true } }), 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()], devToolbar: { enabled: false, }, + });
\ No newline at end of file |
