Skip to main content
Version: Next

PluginServiceFactoryOptions.initialization

Home > @backstage/backend-plugin-api > PluginServiceFactoryOptions > initialization

The initialization strategy for the service factory. This service is plugin scoped and will use lazy 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.