Changelog - 2026-09-14
A component reads its options in binding()
EnhancementIn one line. BaseComponent keeps the options it was configured with on this.configuredOptions, set before binding() runs.
ts
class MailComponent extends BaseComponent<IMailOptions> {
override binding() {
const { provider } = this.configuredOptions ?? {};
}
}
application.component(MailComponent, { options: { provider: 'amazon-ses' } });What changed
- No
configure()override. Options used to reachconfigure()and stop, so every component overrode it to stash a copy. StaticAssetComponenttakes options directly. Passoptions: { assets: { controller, storage, helper } }toapplication.component(StaticAssetComponent, ...). Direct options win when both are present.- The binding key still works.
StaticAssetComponentBindingKeys.STATIC_ASSET_COMPONENT_OPTIONSis read whenever no options are passed. It stays the way to configure a component registered throughconfigs.artifacts, which gets no options.
Who is affected
- You bind
STATIC_ASSET_COMPONENT_OPTIONS. Nothing. - You register
StaticAssetComponentthroughconfigs.artifacts. Nothing. The key stays the way to configure it. - You write your own component. Drop the
configure()override that existed only to keep a copy of the options.