Skip to content

Rule · Lint

Route first-load JS over budget (from .next build output)

lint/route-js-budgetwarnvoid lintupdated

Why it matters

First-load JS is downloaded, parsed and executed before the page becomes interactive. Above ~170 KB gzip on marketing routes, mid-range phones on slow networks see multi-second TBT/INP; the Next 16 framework alone is ~133 KB.

How to fix it

Find what the route pulls in (next experimental-analyze), move work to Server Components, dynamic-import below-the-fold widgets and drop heavy client deps. Budget: marketing ≤170 KB, app ≤300 KB gzip (configurable via budgets.mobile.jsKb).

Example

tsx
const Chart = dynamic(() => import('./chart'), { loading: () => <ChartSkeleton /> })

References

void lint reports 67 rules in this category. Static source checks with no browser: Tailwind v4 silent failures, Next.js 16 API traps, React render-body bugs, accessibility markup, SEO files and motion hygiene.