Corregge il deploy Cloudflare usando il config generato da Astro
Aggiunge lo script deploy:cf con build + wrangler deploy su dist/server/wrangler.json e documenta il setup consigliato per evitare l'errore di entrypoint mancante. Made-with: Cursor
This commit is contained in:
@ -41,3 +41,12 @@ All commands are run from the root of the project, from a terminal:
|
||||
## 👀 Want to learn more?
|
||||
|
||||
Feel free to check [our documentation](https://docs.astro.build) or jump into our [Discord server](https://astro.build/chat).
|
||||
|
||||
## Cloudflare deploy notes
|
||||
|
||||
If you deploy with Wrangler in CI/Cloudflare, build first and deploy using Astro's generated Worker config:
|
||||
|
||||
- Build command: `npm run build`
|
||||
- Deploy command: `npm run deploy:cf`
|
||||
|
||||
This avoids entrypoint errors like `@astrojs/cloudflare/entrypoints/server` not found.
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
"dev": "astro dev",
|
||||
"dev:fresh": "node -e \"require('fs').rmSync('node_modules/.vite',{recursive:true,force:true});\" && astro dev",
|
||||
"build": "astro build",
|
||||
"deploy:cf": "npm run build && wrangler deploy --config dist/server/wrangler.json",
|
||||
"preview": "astro preview",
|
||||
"astro": "astro",
|
||||
"generate-types": "wrangler types"
|
||||
|
||||
Reference in New Issue
Block a user