Zum Inhalt springen
Kitbay
Einreichen
Skill

next-bundle-optimizer

MITAktualisiert am 11. Nov. 2026143.470GitHub-Sterne

A skill published in the Next.js repository, and described in the Next.js documentation, for finding and reducing the JavaScript a Next.js app sends to the browser on first load.

Was der Skill vermittelt

A skill published in the Next.js repository, and described in the Next.js documentation, for finding and reducing the JavaScript a Next.js app sends to the browser on first load. By default it only audits: it captures a snapshot with next analyze, exports the bundle graph as compressed JSON lines, reads it against the installed schema and ranks client-side contributors by size, repetition and risk, including server-only code that may have leaked into the client. When the user asks for fixes, it makes one small change at a time, takes a new snapshot, runs tests, type checks and a behaviour check, and keeps the change only if the numbers improve. It needs Next.js 16.4 or later.

Funktionen

  • Capture and export Next.js bundle analyzer snapshots
  • Rank client-side code by size and repetition per route
  • Flag server-only modules that reached the browser bundle
  • Make and measure one bundle fix at a time