Skip to content

Commit ffcfabb

Browse files
committed
fix Cloudflare deploy: add wrangler devDep and --config flag
The Astro cloudflare adapter generates wrangler.json in dist/server/ with the correct main and assets paths. The root wrangler.toml only has name and nodejs_compat since adding main causes a chicken-and-egg build failure. Deploy command passes --config to point at the generated config.
1 parent 0ecfb98 commit ffcfabb

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

apps/marketing/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@
99
"dev": "astro dev",
1010
"build": "astro build",
1111
"preview": "astro preview",
12-
"deploy": "astro build && bunx wrangler deploy --config dist/server/wrangler.json",
12+
"deploy": "astro build && npx wrangler deploy --config dist/server/wrangler.json",
1313
"astro": "astro"
1414
},
15+
"devDependencies": {
16+
"wrangler": "^4.0.0"
17+
},
1518
"dependencies": {
1619
"@astrojs/tailwind": "^6.0.2",
1720
"@astrojs/cloudflare": "^13.0.0",

bun.lock

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)