I have created a test library (NgxTest) using ng-packagr, which makes use of the APP_BOOTSTRAP_LISTENER injection token: import { APP_BOOTSTRAP_LISTENER, ComponentRef, NgModule } from "@angular/core"; @NgModule() export class NgxTest { static forRoot() { console.log(APP_BOOTSTRAP_LISTENER) return { ngModule: NgxTest, providers: [{ provide: APP_BOOTSTRAP_LISTENER, useFactory: async (c: ComponentRef<any>) => {}, multi: true, }] }; } } However, I'm encountering an issue when I import this library into an Angular project. In my project, I load the library’s configuration using importProvidersFrom(NgxTest.forRoot()) in my app.config.ts: import { ApplicationConfig, importProvidersFrom, provideZoneChangeDetection } from '@angular/core'; import { provideRouter } from '@angular/router'; import { routes } from './app.routes'; import { NgxTest } from 'ngx-test'; export const appConfig: ApplicationConfig = { providers: [ provideZoneChangeDetection({ eventCoalescing: true }), provideRouter(routes), importProvidersFrom(NgxTest.forRoot()), ] }; For some reason, when the library module is imported this way, the APP_BOOTSTRAP_LISTENER injection token gets renamed from InjectionToken to InjectionToken2, which causes it not to be executed during bootstrapping. Continue reading...