diff options
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 |
