https://i.sstatic.net/3R7sr.png
Utilizing a lazy loading module has been efficient, but encountering challenges with certain modules like all-access-pass and page not found as shown in the image above.
Is there a way to effectively remove unused module JS files and ensure that only necessary modules are loaded every time?
app.router.module.js
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
const routes: Routes = [
// Route configurations here...
];
@NgModule({
imports: [RouterModule.forRoot(routes, {
scrollPositionRestoration: 'top'
})],
exports: [RouterModule]
})
export class AppRoutingModule { }