OpenAINext.jsAug 18, 2025, 8:00 PM

Next.js 15.5

A condensed section focused on the key takeaways first.

Original Post

Quick Digest

Summary

A condensed section focused on the key takeaways first.

openaienmodel: gpt-5-mini-2025-08-07

Next.js 15.5

Key Points

  • turbopack builds beta
  • nodejs middleware stable
  • typed routes & typegen

Summary

Next.js 15.5 delivers production beta support for Turbopack builds, stabilizes Node.js middleware, and introduces major TypeScript route typing and tooling improvements. The release also starts deprecations (including next lint and several Next.js 16 removals) to prepare projects for the Next.js 16 migration. This note highlights what engineers should try, upgrade commands, and migration actions.

Key Points

  • Turbopack builds (beta): run builds with next build --turbopack. Turbopack is faster on multi-core machines and is used in production at Vercel; watch CSS ordering and bundle-optimization edge cases.
  • Node.js middleware (stable): middleware can now run in the Node.js runtime via export const config = { runtime: 'nodejs' }, enabling access to Node APIs and packages.
  • TypeScript improvements: stable typed routes, route export validation that works with Turbopack, automatic PageProps/LayoutProps types, and a new next typegen command for standalone type generation and CI checks.
  • Linting change: next lint is deprecated (removed in Next.js 16). New projects use explicit ESLint or Biome configs; use the codemod npx @next/codemod@latest next-lint-to-eslint-cli to migrate scripts.
  • Next.js 16 warnings: dev/build logs now show deprecation notices (notably removal of legacyBehavior on next/link and AMP support). Update code to the modern Link usage and remove AMP pages.

Upgrade & Quick Commands

  • Automated upgrade (recommended):
    • npx @next/codemod@canary upgrade latest
  • Manual upgrade:
    • npm install next@latest react@latest react-dom@latest
  • New project:
    • npx create-next-app@latest
  • Try Turbopack build locally:
    • next build --turbopack
  • Generate route types / CI checks:
    • next typegen && tsc --noEmit
  • Migrate lint scripts:
    • npx @next/codemod@latest next-lint-to-eslint-cli

Practical migration notes

  • If you rely on custom CSS ordering or certain bundle optimizations, test thoroughly under --turbopack and report issues; workarounds and documentation are available.
  • For middleware needing Node APIs, set runtime: 'nodejs' in middleware.ts and validate behavior in edge and server environments.
  • Turn on typedRoutes: true in next.config.ts to opt into stable typed routes and use next typegen in CI to ensure route correctness.
  • Replace legacyBehavior usage and remove AMP pages before upgrading to Next.js 16 to avoid breaking changes.

Full Translation

Translations

A translation section that keeps the flow of the original article.

openaijamodel: gpt-5-mini-2025-08-07

Next.js 15.5

Next.js 15.5

公開日: 2025-08-18T20:00:00.000Z

概要

Next.js 15.5 では、パフォーマンス改善と安定化、将来のメジャーアップグレード準備に向けた変更が含まれています。主なポイントは以下の通りです。

主な変更点

  • Turbopack ビルド(ベータ)

    • Turbopack を用いたビルドがベータとして導入されました。ビルド/再ビルドの高速化を目指した新しいビルドシステムが試験的に利用可能です。
  • Node.js ミドルウェアの安定化

    • Node.js 上でのミドルウェア機能が安定版になり、正式にサポートされるようになりました。
  • TypeScript の改善

    • TypeScript サポートに関する改善が含まれており、型関連の扱いや開発者体験が向上しています。
  • next lint の非推奨

    • CLI の next lint が非推奨になりました。将来的な変更や削除に備えて、該当箇所の確認を推奨します。
  • Next.js 16 に関する非推奨警告

    • Next.js 16 への移行に向けて、非推奨となる機能や API に対する警告が追加されています。次期メジャーバージョンへの対応準備を進めてください。

アップグレード時の注意

  • ベータ機能(Turbopack)は現時点で安定版ではないため、本番環境での採用は慎重に検討してください。
  • next lint の非推奨や Next.js 16 に向けた警告は、将来のアップグレードで問題になり得るため、警告内容を確認し対応を行ってください。