github withastro/astro @astrojs/cloudflare@13.1.0

latest release: astro@6.0.3
6 hours ago

Minor Changes

  • #15711 b2bd27b Thanks @OliverSpeir! - Adds a prerenderEnvironment option to the Cloudflare adapter.

    By default, Cloudflare uses its workerd runtime for prerendering static pages. Set prerenderEnvironment to 'node' to use Astro's built-in Node.js prerender environment instead, giving prerendered pages access to the full Node.js ecosystem during both build and dev. This is useful when your prerendered pages depend on Node.js-specific APIs or NPM packages that aren't compatible with workerd.

    // astro.config.mjs
    import cloudflare from '@astrojs/cloudflare';
    import { defineConfig } from 'astro/config';
    
    export default defineConfig({
      adapter: cloudflare({
        prerenderEnvironment: 'node',
      }),
    });

Patch Changes

  • #15845 50fcc8b Thanks @aqiray! - fix: show actionable error when running astro preview without prior build

  • #15794 d1ac58e Thanks @OliverSpeir! - Fixes image serving in passthrough mode by using the Cloudflare ASSETS binding instead of generic fetch, which does not work in Workers for local assets

  • #15850 660da74 Thanks @tristanbes! - fix(cloudflare): forward configPath and other PluginConfig options to the Cloudflare Vite Plugin

    Options like configPath, inspectorPort, persistState, remoteBindings, and auxiliaryWorkers were accepted by the type system but never forwarded to cfVitePlugin(), making them silently ignored.

    Also fixes addWatchFile for configPath which resolved the path relative to the adapter's node_modules directory instead of the project root.

  • #15843 fcd237d Thanks @Calvin-LL! - fix cloudflare image transform ignoring quality parameter

  • Updated dependencies []:

    • @astrojs/underscore-redirects@1.0.1

Don't miss a new astro release

NewReleases is sending notifications on new releases.