@astrojs/cloudflare@14.3.0
Minor Changes
-
#17795
15e2debThanks @matthewp! - Adds concurrent rendering support forexperimental.incrementalBuild, including when using@astrojs/cloudflareIncremental builds no longer disable caching when
build.concurrencyis greater than1. Projects that setbuild.concurrency: 1to keep the cache enabled can remove that workaround. Cloudflare builds also reduce serialization overhead for large prerendered pages. -
#17887
35aa62eThanks @matthewp! - Adds a Cloudflarefinalize()response handler for custom request handlersCall
finalize()to apply cookies and Cloudflare CDN cache defaults to the response from anastro/fetchpipeline:import { astro, FetchState } from 'astro/fetch'; import { cf, finalize } from '@astrojs/cloudflare/fetch'; export default { async fetch(request: Request, env: Env, context: ExecutionContext) { const state = new FetchState(request); const asset = await cf(state, env, context); if (asset) return asset; return finalize(state, await astro(state)); }, };
The
@astrojs/cloudflare/honomiddleware applies these response headers automatically. Cloudflare custom entrypoints also fall back to static assets when no Astro route matches and use the default server entrypoint when prerendering through workerd.
Patch Changes
-
#17895
41b88acThanks @astro-factory! - Fixes coldastro devcrashes by addingastro/app/manifestand@astrojs/cloudflare/cache/providerto theoptimizeDeps.includelist -
Updated dependencies []:
- @astrojs/underscore-redirects@1.0.4