Astro @astrojs/cloudflare@14.3.0

@astrojs/cloudflare@14.3.0
Added 2
  • Add concurrent rendering support for `experimental.incrementalBuild` when using `@astrojs/cloudflare`
  • Add a Cloudflare `finalize()` response handler for custom request handlers to apply cookies and Cloudflare CDN cache defaults
Changed 5
  • Incremental builds no longer disable caching when `build.concurrency` is greater than `1`
  • Cloudflare builds reduce serialization overhead for large prerendered pages
  • The `@astrojs/cloudflare/hono` middleware applies response headers automatically
  • Cloudflare custom entrypoints fall back to static assets when no Astro route matches
  • Cloudflare custom entrypoints use the default server entrypoint when prerendering through workerd
Fixed 1
  • Fix cold `astro dev` crashes by adding `astro/app/manifest` and `@astrojs/cloudflare/cache/provider` to the `optimizeDeps.include` list

From Astro

Minor Changes
  • #17795 15e2deb Thanks @matthewp! - Adds concurrent rendering support for experimental.incrementalBuild, including when using @astrojs/cloudflare

    Incremental builds no longer disable caching when build.concurrency is greater than 1. Projects that set build.concurrency: 1 to keep the cache enabled can remove that workaround. Cloudflare builds also reduce serialization overhead for large prerendered pages.

  • #17887 35aa62e Thanks @matthewp! - Adds a Cloudflare finalize() response handler for custom request handlers

    Call finalize() to apply cookies and Cloudflare CDN cache defaults to the response from an astro/fetch pipeline:

    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/hono middleware 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 41b88ac Thanks @astro-factory! - Fixes cold astro dev crashes by adding astro/app/manifest and @astrojs/cloudflare/cache/provider to the optimizeDeps.include list

  • Updated dependencies []:

    • @astrojs/underscore-redirects@1.0.4
View original

Upgraded? How did it go?

Discussion