RootServiceFactoryOptions.initialization
Home > @backstage/backend-plugin-api
> RootServiceFactoryOptions
> initialization
The initialization strategy for the service factory. This service is root scoped and will use always
by default.
Signature:
initialization?: 'always' | 'lazy';
Remarks
always
- The service will always be initialized regardless if it is used or not. -lazy
- The service will only be initialized if it is depended on by a different service or feature.
Service factories for root scoped services use always
as the default, while plugin scoped services use lazy
.