Given a main Angular 19 app with a bootstrap like this: bootstrapApplication(ProductionAppComponent, { providers: [ importProvidersFrom( CommonAppModule ), { provide: TranslationInitializationService, useClass: VariantATranslationInitializationService, }, }); }); and a common app module like this: @NgModule({ providers: [ provideAppInitializer(() => initTranslations(inject(TranslationInitializationService))), ], }) export class CommonAppModule {} This fails with a NullInjectorError at runtime only when buildOptimization is enabled. When I move the the App initializer to the main app like this: bootstrapApplication(ProductionAppComponent, { providers: [ importProvidersFrom( CommonAppModule ), { provide: TranslationInitializationService, useClass: VariantATranslationInitializationService, }, provideAppInitializer(() => initTranslations(inject(TranslationInitializationService))), ], }); }); ...it works. Previously, I was using the APP_INITIALIZER token instead of the provideAppInitializer function and it was working perfectly. Is there an ordering or reason why apparently the app initializer in the common app module is not able to resolve the provider defined in the main app? I was expecting that the whole list of providers is flattened and then the tree is build from that. For context: There is a second app with a different implementation (VariantBTranslationInitializationService) and I want to have the initialization code only once. Continue reading...