@astrojs/cloudflare
14.4.1 · 19 Oct 2026MIT853.9k / weekRepositoryHomepagenpmAtom feed
183 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.
- 14.x · latest line
14.4.1
19 Oct 2026Fixes
Cannot find package 'prismjs'errors whenprismjsisn't hoisted, such as with pnpm's global virtual store orhoist=false
Patch Changes
Fixes
Cannot find package 'prismjs'errors whenprismjsisn't hoisted, such as with pnpm's global virtual store orhoist=false
14.4.0
15 Oct 2026Reworks image processing on prerendered pages to use Astro's built-in image pipeline. Requires
astro@^7.4.0Images on prerendered pages now behave the same as on other adapters. Images optimized with the Cloudflare Images binding are now properly cached between builds, and image options such as
assetQueryParamsandbuild.assetsPrefixare applied the same way as everywhere else.
Minor Changes
Reworks image processing on prerendered pages to use Astro's built-in image pipeline. Requires
astro@^7.4.0Images on prerendered pages now behave the same as on other adapters. Images optimized with the Cloudflare Images binding are now properly cached between builds, and image options such as
assetQueryParamsandbuild.assetsPrefixare applied the same way as everywhere else.
14.3.4
6 Oct 2026Fixes the
globalThis.processshim being prepended to client-side scripts. The shim is now only added to the server output.Fixes the
@astrojs/cloudflare/honousage example soi18n()is mounted beforepages(). In the old order,i18n()never ran, so locale redirects and fallbacks were skipped.Fixes dev dependency scan failing when a frontmatter line starts with
import.metaorimport(
Patch Changes
Fixes the
globalThis.processshim being prepended to client-side scripts. The shim is now only added to the server output.Fixes the
@astrojs/cloudflare/honousage example soi18n()is mounted beforepages(). In the old order,i18n()never ran, so locale redirects and fallbacks were skipped.Fixes dev dependency scan failing when a frontmatter line starts with
import.metaorimport(Fixes remote images without a file extension failing with
400 Unsupported format: nullwhen using thecloudflare-bindingimage serviceAstro only adds the
f(format) parameter to/_imageURLs when it can infer a format from the source, and otherwise leaves it off so the image service resolves the format from the source itself. Extensionless remote images, such as GitHub avatars likehttps://avatars.githubusercontent.com/u/1234, take that path. The image transform endpoint now falls back to the source's media type whenfis absent, passing SVG sources through unchanged and encoding everything else as WebP. This also fixes SVG images, which are requested asf=svgand previously failed the same way.Fixes
astro buildfailing withfetch failed/connect ECONNREFUSED 127.0.0.1:<port>during prerendering on hosts wherelocalhostresolves to IPv6The prerenderer started its Vite preview server with
host: 'localhost'and then built the fetch URL by re-stating that same hostname.localhostwas therefore resolved twice, independently — once bylisten()to pick a bind address and once byfetch()to pick a connect address — with nothing making the two agree. On hosts where those resolutions land on different families, the preview server listens on::1whilefetchdials127.0.0.1, and every prerender request is refused. The URL is now derived from the address actually bound, so bind and connect agree by construction.
14.3.3
22 Sep 2026Fixes image transforms without a specified quality outputting an higher quality than expected on certain formats
Fixes
optimizeDeps.includeglobastro/runtime/**matching.d.tsfiles, which caused 83 unnecessary optimizer entries and empty output chunks per environment during devFixes image requests when using
imageService: 'compile'withpassthroughImageService().
Patch Changes
Fixes image transforms without a specified quality outputting an higher quality than expected on certain formats
Fixes
optimizeDeps.includeglobastro/runtime/**matching.d.tsfiles, which caused 83 unnecessary optimizer entries and empty output chunks per environment during devFixes image requests when using
imageService: 'compile'withpassthroughImageService().
14.3.2
16 Sep 2026Fixes a build failure when the wrangler config uses the
exportsfield to declare Durable Object classesFixes cold
astro devcrashes when using the passthrough image serviceFixes broken images on static sites by transforming prerendered images at build time with the default Cloudflare Images binding
Patch Changes
Fixes a build failure when the wrangler config uses the
exportsfield to declare Durable Object classesFixes cold
astro devcrashes when using the passthrough image serviceFixes broken images on static sites by transforming prerendered images at build time with the default Cloudflare Images binding
Pre-bundles renderer server entrypoints and the default console logger during dev so they are included in the initial optimization pass, preventing a mid-request re-optimization that could crash the dev server on Cloudflare (workerd).
14.3.1
8 Sep 2026Fixes a build crash when a custom worker entrypoint exports Durable Object classes alongside prerendered pages. The prerender worker no longer inherits
durable_objects,migrations, orworkflowsfrom the entry worker config.
Patch Changes
Fixes a build crash when a custom worker entrypoint exports Durable Object classes alongside prerendered pages. The prerender worker no longer inherits
durable_objects,migrations, orworkflowsfrom the entry worker config.
14.3.0
3 Sep 2026Adds concurrent rendering support for
experimental.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.Adds a Cloudflare
finalize()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.Fixes cold
astro devcrashes by addingastro/app/manifestand@astrojs/cloudflare/cache/providerto theoptimizeDeps.includelist
Minor Changes
Adds concurrent rendering support for
experimental.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.Adds a Cloudflare
finalize()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
Fixes cold
astro devcrashes by addingastro/app/manifestand@astrojs/cloudflare/cache/providerto theoptimizeDeps.includelist
14.2.6
31 Aug 2026Added
@astrojs/prismto the list of dependencies to optimise. The dev server is now faster for sites that use Prism as code highlighter.Fixes React SSR failures on the first Cloudflare dev request when JSON logging is enabled
Patch Changes
Added
@astrojs/prismto the list of dependencies to optimise. The dev server is now faster for sites that use Prism as code highlighter.Fixes React SSR failures on the first Cloudflare dev request when JSON logging is enabled
14.2.5
25 Aug 2026Updates generated and default Cloudflare
compatibility_datevalues to match the installed runtime and requires Wrangler^4.125.0Adds the Worker version to the cache metadata of cached responses when the
CF_VERSION_METADATAbinding is configured. Responses carry anastro-version:<id>cache tag for version-specific purging, and responses that already sendLast-Modifiedget a weakETagthat folds the version in. Conditional revalidation then returns fresh content after a deploy that changes rendered output but not content — most commonly the hashed asset URLs in server-rendered HTML. Without the binding, nothing changes.
Patch Changes
Updates generated and default Cloudflare
compatibility_datevalues to match the installed runtime and requires Wrangler^4.125.0Adds the Worker version to the cache metadata of cached responses when the
CF_VERSION_METADATAbinding is configured. Responses carry anastro-version:<id>cache tag for version-specific purging, and responses that already sendLast-Modifiedget a weakETagthat folds the version in. Conditional revalidation then returns fresh content after a deploy that changes rendered output but not content — most commonly the hashed asset URLs in server-rendered HTML. Without the binding, nothing changes.
14.2.4
24 Aug 2026Fixes dep scanning failure when
.astrofrontmatter contains regex literals with quote characters (e.g./"/g)
Patch Changes
Fixes dep scanning failure when
.astrofrontmatter contains regex literals with quote characters (e.g./"/g)
14.2.2 – 14.2.32 releases that only update dependencies@astrojs/internal-helpers 0.10.4@astrojs/underscore-redirects 1.0.4Show each
14.2.1
11 Aug 2026Fixes the
astropeer dependency range from^7.0.0to^7.2.0. The adapter imports symbols (beginContentEntryCollection,beginImageCollection,endContentEntryCollection,endImageCollection) fromastro/appthat were added in Astro 7.2.0, so earlier versions fail at build time with aMISSING_EXPORTerror.
Patch Changes
Fixes the
astropeer dependency range from^7.0.0to^7.2.0. The adapter imports symbols (beginContentEntryCollection,beginImageCollection,endContentEntryCollection,endImageCollection) fromastro/appthat were added in Astro 7.2.0, so earlier versions fail at build time with aMISSING_EXPORTerror.
14.2.0
6 Aug 2026Adds opt-in build-time image optimization for the
cloudflare-bindingimage service.When enabled, the Cloudflare IMAGES binding transforms static images in the workerd prerender environment, and the optimized bytes are written directly to the output directory. If the binding fails, it falls back to Sharp.
To opt in, use the compound configuration form:
export default defineConfig({ adapter: cloudflare({ imageService: { build: 'cloudflare-binding', runtime: 'cloudflare-binding' }, }), });The string shorthand
imageService: 'cloudflare-binding'preserves the current runtime-only behavior and is unaffected.When
session: falseis set inastro.config, the adapter no longer auto-wires the Cloudflare KV session driver. Combined with the matchingastrochange, this lets the session runtime tree-shake out of the Worker bundle.Supports Astro's experimental incremental static builds. When
experimental.incrementalBuildis enabled, the adapter skips unchanged pages between builds.
Minor Changes
Adds opt-in build-time image optimization for the
cloudflare-bindingimage service.When enabled, the Cloudflare IMAGES binding transforms static images in the workerd prerender environment, and the optimized bytes are written directly to the output directory. If the binding fails, it falls back to Sharp.
To opt in, use the compound configuration form:
export default defineConfig({ adapter: cloudflare({ imageService: { build: 'cloudflare-binding', runtime: 'cloudflare-binding' }, }), });The string shorthand
imageService: 'cloudflare-binding'preserves the current runtime-only behavior and is unaffected.When
session: falseis set inastro.config, the adapter no longer auto-wires the Cloudflare KV session driver. Combined with the matchingastrochange, this lets the session runtime tree-shake out of the Worker bundle.Supports Astro's experimental incremental static builds. When
experimental.incrementalBuildis enabled, the adapter skips unchanged pages between builds.
Patch Changes
Fixes
/_imagereturning 500 in dev mode when usingimageService: 'custom'. Astro's default dev image endpoint importsviteandnode:fs, which cannot be loaded inside workerd. Thecustomand fallback cases now use the generic fetch-based endpoint in dev, matching the other image service modes. A user-configuredimage.endpointis left untouched.Additionally, a dev-time warning is now logged when
imageService: 'custom'resolves to the Sharp service (including when noimage.serviceis configured), since Sharp's native binding cannot run inside workerd in dev or production.Fixes a crash on
/_imagecache hits when the Cloudflare cache provider is enabled. Responses served from the Workers Cache API have immutable headers, and the request handler crashed with "Can't modify immutable headers" when applying its defaultCloudflare-CDN-Cache-Control: no-storeheader to them. The handler now rebuilds the response with mutable headers when needed.Fixes
imageService: 'compile'producing unoptimized images whenprerenderEnvironmentis set to'node'Fixes a type-checking error when using
app.use(cf())from@astrojs/cloudflare/honoin projects withwrangler types-generatedExecutionContextdeclarations
14.1.7
29 Jul 2026Fixes a bug where Cloudflare couldn't load chunked collections via
experimental.collectionStorage: 'chunked'.
Patch Changes
Fixes a bug where Cloudflare couldn't load chunked collections via
experimental.collectionStorage: 'chunked'.
14.1.6
28 Jul 2026Only updates dependencies:@astrojs/internal-helpers 0.10.2@astrojs/underscore-redirects 1.0.3
14.1.5
27 Jul 2026Fixes a bug where an explicit
cache: { enabled: false }in your wrangler config was overridden and forced totruewhen a Workers cache provider was configured
Patch Changes
Fixes a bug where an explicit
cache: { enabled: false }in your wrangler config was overridden and forced totruewhen a Workers cache provider was configured
14.1.4
20 Jul 2026Reading the note…
14.1.3
13 Jul 2026Reading the note…
14.1.2
8 Jul 2026Reading the note…
14.1.1
2 Jul 2026Reading the note…
14.1.0
1 Jul 2026Reading the note…
14.0.2
30 Jun 2026Reading the note…
14.0.1
25 Jun 2026Reading the note…
14.0.0
22 Jun 2026Reading the note…
- 13.x
13.7.0
9 Jun 2026Reading the note…
13.6.1
2 Jun 2026Reading the note…
13.6.0
28 May 2026Reading the note…
13.5.5
26 May 2026Reading the note…
13.5.4
21 May 2026Reading the note…
13.5.3
20 May 2026Reading the note…
13.5.2
18 May 2026Reading the note…
13.5.1
13 May 2026Reading the note…
13.5.0
7 May 2026Reading the note…
13.4.0
7 May 2026Reading the note…
13.3.1
4 May 2026Reading the note…
13.3.0
30 Apr 2026Reading the note…
13.2.2
28 Apr 2026Reading the note…
13.2.1
23 Apr 2026Reading the note…
13.2.0
22 Apr 2026Reading the note…
13.1.10
15 Apr 2026Reading the note…
13.1.9
13 Apr 2026Reading the note…
13.1.8
8 Apr 2026Reading the note…
13.1.7
1 Apr 2026Reading the note…
13.1.6
30 Mar 2026Reading the note…
13.1.5
30 Mar 2026Reading the note…
13.1.4
26 Mar 2026Reading the note…
13.1.3
20 Mar 2026Reading the note…
13.1.2
16 Mar 2026Reading the note…
13.1.1
12 Mar 2026Reading the note…