In angular(2/4/6) application if we import unnecessary modules in app module will that slow down the application.
Does it impact on the performance of the application ?
@NgModule({
imports: [
BrowserModule.withServerTransition({ appId: 'myId' }),
FormsModule,
AppRoutingModule,
HttpClientModule,
HttpClientInMemoryWebApiModule,
AaModule,
BbModule
],
declarations: [
AppComponent,
AdminComponent
],
providers: [ ],
bootstrap: [ AppComponent ]
})
Importing unnecessarily module bloats your application size significantly. It also applies to any angular module you might want to use, including third-party ones.