Feature
Serve Workers Static Assets from a URL path prefix
Workers Static Assets can now serve assets from a URL path prefix without changing their directory structure. Set assets.base_path in Wrangler, or worker.assets.basePath in cloudflare.config.ts.
Use Wrangler 4.148.0 or later. With cloudflare.config.ts, use cf 1.0.0-beta.13 or later.
For example, this configuration serves your built assets from /blog/:
Select your preferred CLI
Changes examples on this page to use the selected CLI.
{ "$schema": "./node_modules/wrangler/config-schema.json", "assets": { "directory": "./dist", "base_path": "/blog" } }
[assets] directory = "./dist" base_path = "/blog"
cloudflare.config.ts
import { defineConfig } from "cf/config"; export default defineConfig({ worker: { name: "blog", // Set this to today's date compatibilityDate: "2026-10-28", assets: { basePath: "/blog", }, }, });
With Wrangler, assets.directory selects the directory to serve. With cloudflare.config.ts, your build configuration supplies the assets.
To configure the option, refer to Serving a subdirectory.
Read the original announcement
Get Cloudflare CLI updates by email
Don't miss the next one: a weekly email with Cloudflare CLI's new features and deprecations.