Currently, the service is a constant (and is forced to be a constant) https://github.com/nfroidure/knifecycle/blob/main/src/index.ts#L283
The reason for it is that loading a service could lead to different results overtime which is not a good thing.
That said, we could allow to change the $overrides mapping (and autoload it) by checking that the mapping were not used yet and refuse to change it by another mapping that don't fit the previously mapped service names.
Currently, the service is a constant (and is forced to be a constant) https://github.com/nfroidure/knifecycle/blob/main/src/index.ts#L283
The reason for it is that loading a service could lead to different results overtime which is not a good thing.
That said, we could allow to change the
$overridesmapping (and autoload it) by checking that the mapping were not used yet and refuse to change it by another mapping that don't fit the previously mapped service names.