After upgrading to Angular 7, I've been diving into the world of Lazy loaded modules. However, despite my efforts, I can't seem to find #chunk.js
anywhere in the network tab when I click on components within the lazy loaded module.
Even when Contact us loads a component lazily, the elusive #chunk.js
remains absent from the network tab.
https://i.sstatic.net/vilzZ.jpg
Here's how I have implemented lazy loading for my module:
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ContactUsComponent } from 'src/app/modules/contactus/contactus.component';
import { ErrorComponent } from 'src/app/modules/error/error.component';
import { ContactUsRoutingModule } from 'src/app/modules/contactus/contactus-routing.module';
import { LandingComponent } from 'src/app/modules/landing/landing.component';
import { AboutUsComponent } from 'src/app/modules/aboutus/aboutus.component';
const routes: Routes = [
{ path: '', redirectTo: 'landing', pathMatch: 'full' },
{ path: 'landing', component: LandingComponent },
{ path: 'aboutus', component: AboutUsComponent },
{ path: 'contactus', loadChildren: './modules/contactus/contactus.module#ContactusModule' },
{ path: '**', component: ErrorComponent }
];
@NgModule({
imports: [RouterModule.forRoot(routes, { enableTracing: true })],
exports: [RouterModule]
})
export class AppRoutingModule { }
Could it be that I missed something crucial or perhaps the mysterious file #chunk.js
has been metamorphosed into another entity?