I have absolutely no idea why this is happening but every single one of my lazy loaded ionic page loads ALL *.js chunks and I am unable to benefit from lazy loading.
Its a fairly large app. Each page load is downloading about 46mb of data, most of which are all 0.js, 1.js, .... When going to different pages, I don't see any more *.js being downloaded.
Please help!!!!!!.
Lazy Loaded Module
@NgModule({
imports: [
IonicPageModule.forChild(PostWidgetComponent)
],
declarations: [
PostWidgetComponent
],
entryComponents: [],
providers: [],
exports: [PostWidgetComponent]
})
export class PostWidgetModule { }
App Module
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
BrowserAnimationsModule,
IonicModule.forRoot(AppComponent, {
preloadModules: true
}),
ProvidersModule
],
bootstrap: [IonicApp],
entryComponents: [AppComponent],
providers: [
/* { provide: ErrorHandler, useClass: IonicErrorHandler }, */
StatusBar,
SplashScreen
]
})
export class AppModule { }