wrangler@4.13.0
·
2613 commits
to main
since this release
Minor Changes
-
#8640
5ce70bdThanks @kentonv! - Add support for definingpropson a Service binding.In your configuration file, you can define a service binding with props:
{ "services": [ { "binding": "MY_SERVICE", "service": "some-worker", "props": { "foo": 123, "bar": "value" } } ] }These can then be accessed by the callee:
import { WorkerEntrypoint } from "cloudflare:workers"; export default class extends WorkerEntrypoint { fetch() { return new Response(JSON.stringify(this.ctx.props)); } }
-
#8771
0cfcfe0Thanks @dario-piotrowicz! - feat: addconfig.keep_namesoptionAdds a new option to Wrangler to allow developers to opt out of esbuild's
keep_namesoption (https://esbuild.github.io/api/#keep-names). By default, Wrangler sets this totrueThis is something developers should not usually need to care about, but sometimes
keep_namescan create issues, and in such cases they will be now able to opt-out.Example
wrangler.jsonc:{ "name": "my-worker", "main": "src/worker.ts", "keep_names": false }