I did some more careful reading and building sample projects. And either there is a bug or cloudflar
I did some more careful reading and building sample projects. And either there is a bug or cloudflare needs to update their documentation about deploying an astro site. My observations:
https://developers.cloudflare.com/pages/framework-guides/deploy-an-astro-site/
https://docs.astro.build/en/guides/deploy/cloudflare/
replicate the issue with SSR:
both astro and cloudflare docs need to be updated to make this limitation clear IMO. the cloudfare docs make it seem as though you can use the functions directory while using SSR but this is not the case. (unless i'm doing something wrong)
- if you deploy an astro site using the astro cloudflare plugin (SSR), you cannot use the /functions directory. you must use astro endpoints
- if you deploy astro static site (don't use astro cloudflare plugin), you can use the /functions directory
https://developers.cloudflare.com/pages/framework-guides/deploy-an-astro-site/
https://docs.astro.build/en/guides/deploy/cloudflare/
replicate the issue with SSR:
both astro and cloudflare docs need to be updated to make this limitation clear IMO. the cloudfare docs make it seem as though you can use the functions directory while using SSR but this is not the case. (unless i'm doing something wrong)
Astro is an all-in-one web framework for building fast, content-focused websites. By default, Astro builds websites that have zero JavaScript runtime …

Astro Documentation
How to deploy your Astro site to the web using Cloudflare Pages.




