Skip to content

Commit

Permalink
fix cloudflare build error - withastro/astro#11005
Browse files Browse the repository at this point in the history
  • Loading branch information
chiubaca committed May 12, 2024
1 parent 2f22be8 commit c7a5743
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 11 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,15 @@ export default defineConfig({
actions: true,
},
integrations: [react()],
adapter: cloudflare(),
vite: {
ssr: {
external: ["node:async_hooks"],
},
},
adapter: cloudflare({
platformProxy: {
enabled: true,
configPath: "wrangler.toml",
},
}),
});
4 changes: 3 additions & 1 deletion wrangler.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
node_compat = true
name = "fullstack-astro-cloudflare"
compatibility_date = "2024-04-19"
compatibility_flags = ["nodejs_compat"]

# [[d1_databases]]
# binding = "DB"
Expand Down

0 comments on commit c7a5743

Please sign in to comment.