Sébastien Rigaux

Next.js: an AI skill analyzes imports to reduce shipped JavaScript

View resource

nextjs.org

Next.js 16.4 includes an AI agent skill that analyzes Turbopack’s module and chunk graph to find imports that add to shipped JavaScript. It can, for example, spot when a static import elsewhere in the bundle prevents a component from staying deferred, then suggest changes for review before applying them.

The analyzer also compares snapshots and filters code loaded on the initial render. Vercel reports nearly two megabytes of compressed JavaScript saved across v0 and vercel.com; the fixes were checked on preview deployments. The tool requires Turbopack, the default bundler since Next.js 16.

Black graphic with the text “Ship less JavaScript in Next.js with your AI agent” and the Next.js logo.