Next.js 15.2
Key Points
- Redesigned error overlay and higher-fidelity stack traces
- Streaming metadata: initial UI can render before generateMetadata completes
- Turbopack: ~57% faster compiles and ~30% lower dev memory
Summary
Next.js 15.2 improves the developer experience with a redesigned error overlay and higher-fidelity stack traces, introduces streaming metadata so async generateMetadata doesn't block initial UI, and delivers notable Turbopack performance improvements. The release also adds experimental support for React View Transitions and a Node.js runtime option for Middleware.
Key Points
-
Redesigned error UI and stack traces
- New error overlay highlights message, code frame, and call stack while reducing library noise.
- Uses React owner stacks to surface the subcomponent responsible for errors and includes an in-overlay feedback control.
- New dev indicator shows rendering mode, Turbopack compile status, and quick access to active errors.
-
Streaming metadata
- generateMetadata can run async without delaying initial paint; browsers get initial UI before metadata finishes.
- Bots/crawlers still receive full HTML by default; use the htmlLimitedBots option in next.config.js to customize behavior.
-
Turbopack performance
- Early adopters report up to ~57% faster compile times versus 15.1 and ~30% reduced memory usage in dev for large apps.
- Persistent caching and production build optimizations are in progress and being dogfooded.
-
Experimental features
- React View Transitions (feature flag) to animate between views: enable via experimental.viewTransition.
- Node.js Middleware runtime (experimental.nodeMiddleware) lets middleware run in Node.js; not recommended for production yet (requires canary).
-
Other notable changes
- "use cache" moving toward beta, image quality support in next/image, API-only create-next-app flag, lint and error-reporting improvements.
Upgrade
- Automated codemod:
npx @next/codemod@canary upgrade latest
- Manual:
npm install next@latest react@latest react-dom@latest
- New project:
npx create-next-app@latest
Quick config snippets
- Enable View Transitions (experimental):
// next.config.js
module.exports = {
experimental: { viewTransition: true },
}
- Enable Node.js Middleware (experimental):
// next.config.js
module.exports = {
experimental: { nodeMiddleware: true },
}
- Example middleware runtime flag:
export const config = { runtime: 'nodejs' }
Notes for engineers
- Experimental flags are not production-recommended; Node.js Middleware will error on the stable channel unless using next@canary.
- Streaming metadata improves TTFP/first paint but preserves crawler behavior; adjust htmlLimitedBots for custom bot treatment.
- If Turbopack is slower for your app, collect repro metrics and report them to help the team investigate.
Links
Refer to the release post and Next.js docs for detailed migration steps, examples, and edge-case guidance.