Minor Changes
-
#8640
5ce70bd
Thanks @kentonv! - Add support for definingprops
on 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
0cfcfe0
Thanks @dario-piotrowicz! - feat: addconfig.keep_names
optionAdds a new option to Wrangler to allow developers to opt out of esbuild's
keep_names
option (https://esbuild.github.io/api/#keep-names). By default, Wrangler sets this totrue
This is something developers should not usually need to care about, but sometimes
keep_names
can 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 }