Use Platform in ngModule

Is there a way to use Platform from @ionic/angular inside the @NgModule

@NgModule({
  declarations: [
    AppComponent
  ],
  entryComponents: [
    TermsComponent,
    ....
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(),
    AppRoutingModule,
    ServiceWorkerModule.register('OneSignalSDKWorker.js', { enabled: platform.is('pwa') }),
    AngularFireModule.initializeApp(environment.firebase),
    AngularFireStorageModule,
    ...
  ],
  providers: [
    {provide: ErrorHandler, useClass: environment.production ? SentryErrorHandler : ErrorHandler}
  ],
  bootstrap: [AppComponent]
})
export class AppModule {
  constructor(public platform: Platform) {
    console.log('plat: ', this.platform.is('android'));
  }
}

I only want the service worker module to be active on PWA, not on hybrid.
Currently an environment variable