@cloudflare/config@0.6.0
·
6 commits
to main
since this release
Minor Changes
-
#15026
6529f0cThanks @petebacondarwin! - Add acontaineroption toexports.durableObject()Live Durable Object exports can now attach a container by name, matching the new
containerfield in the Wrangler configuration format:import { defineWorker, exports } from "@cloudflare/config"; export default defineWorker({ name: "my-worker", compatibilityDate: "2026-07-01", exports: { MyContainerDO: exports.durableObject({ storage: "sqlite", container: "my-container", }), }, });
Containers are only supported on the SQLite storage engine, so
containeris only offered alongsidestorage: "sqlite". Passing it withstorage: "legacy-kv"is a type error rather than something only caught on deploy:exports.durableObject({ storage: "legacy-kv", // Object literal may only specify known properties, // and 'container' does not exist in type '{ storage: "legacy-kv" }' container: "my-container", });
This is an experimental feature: containers themselves are not yet configurable from
cloudflare.config.ts, so the field is only useful once they are.