Minor Changes
-
#15711
b2bd27bThanks @OliverSpeir! - Adds aprerenderEnvironmentoption to the Cloudflare adapter.By default, Cloudflare uses its workerd runtime for prerendering static pages. Set
prerenderEnvironmentto'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
50fcc8bThanks @aqiray! - fix: show actionable error when running astro preview without prior build -
#15794
d1ac58eThanks @OliverSpeir! - Fixes image serving inpassthroughmode by using the CloudflareASSETSbinding instead of generic fetch, which does not work in Workers for local assets -
#15850
660da74Thanks @tristanbes! - fix(cloudflare): forwardconfigPathand otherPluginConfigoptions to the Cloudflare Vite PluginOptions like
configPath,inspectorPort,persistState,remoteBindings, andauxiliaryWorkerswere accepted by the type system but never forwarded tocfVitePlugin(), making them silently ignored.Also fixes
addWatchFileforconfigPathwhich resolved the path relative to the adapter'snode_modulesdirectory instead of the project root. -
#15843
fcd237dThanks @Calvin-LL! - fix cloudflare image transform ignoring quality parameter -
Updated dependencies []:
- @astrojs/underscore-redirects@1.0.1