What the new export looks like
cloudflare.config.ts is Wrangler’s experimental TypeScript-based alternative to wrangler.toml/wrangler.jsonc, available behind wrangler --experimental-new-config. Before this change, everything, including account-level settings, lived in the file’s single default export alongside the Worker’s own bindings and routes.
wrangler@4.113.0’s changelog states it plainly:
“Add a
settingsexport to the experimentalcloudflare.config.tsconfig”
The actual code shape, from the merged pull request (cloudflare/workers-sdk#14724, “Support settings export in new config,” merged 2026-07-20):
import { defineSettings } from "wrangler/config";
export const settings = defineSettings({
accountId: "<your-account-id>",
});settings accepts accountId and complianceRegion. The Worker’s own configuration stays on the default export, unchanged; settings is a new, separate export sitting next to it in the same file.
Structural Comparison Matrix
| Operational Aspect | Before (v4.112.0 and earlier) | After (v4.113.0+) |
|---|---|---|
| Where account settings live | Inline in the single default export | Dedicated settings export via defineSettings |
| Compliance region config | Mixed with Worker-level fields | Isolated in settings, alongside accountId |
| Failure mode if not migrated | N/A | Settings silently don’t apply; no error thrown |
Fix it: split the exports
No error on a missing settings export
Wrangler doesn’t fail the build if cloudflare.config.ts has no settings
export. It just means account-level fields you expected to apply, like a
compliance region restriction, don’t take effect. Confirm the setting is
actually active through the dashboard or API, not just by the file compiling.
Before: everything on the default export
export default {
name: "my-worker",
main: "src/index.ts",
accountId: "<your-account-id>",
};After: account settings split into their own export
import { defineSettings } from "wrangler/config";
export const settings = defineSettings({
accountId: "<your-account-id>",
complianceRegion: "eu",
});
export default {
name: "my-worker",
main: "src/index.ts",
};Confirmed version
Sourced from cloudflare/workers-sdk’s packages/wrangler/CHANGELOG.md (wrangler@4.113.0, released 2026-07-21) and the merged pull request implementing it (#14724, merged 2026-07-20). This wasn’t independently reproduced against a live account here, since cloudflare.config.ts is still experimental and this site’s own deploy runs on wrangler.toml; the changelog and the PR’s own code example are the primary sources. Browse more posts like this in the Dev Tools archive.







