1
votes
Fixing Server Component Bundle Leaks in Next.js with AST Linting
The Next.js App Router's component model draws a line between server and client execution, but that line is far more porous than most teams realize. Server-module leaks into client bundles represent one of the most common, most silent performance regressions in Next.js 15+ applications. When server-only code, including database drivers, authentication libraries, and Node.js built-in modules, slips across the 'use client' boundary, client bundles can grow by meaningful amounts.