Development2026 · 04 · 4 min read
Lazy loading that actually pays off
Route-level splitting is free performance — if you draw the boundaries in the right place.
Lazy loading only helps when the split lines up with how people actually move through the app. Split by feature, not by folder.
ts
export const routes: Routes = [
{
path: 'projects',
loadComponent: () =>
import('./projects/projects.page')
.then(m => m.ProjectsPage),
canActivate: [authGuard],
},
];Measure, don't guess
A route that everyone hits on first load shouldn't be lazy. Save splitting for the deep, optional corners.
On Riwaq this kind of discipline was part of hitting a 98% Lighthouse score on both mobile and desktop — the initial bundle only carried what the first screen needed.