Next.js 15.5 发布 - Turbopack 生产构建、Node.js 中间件和更严格的 TypeScript 开发体验

  • Next.js 15.5 Release: Focuses on faster production builds, more powerful server-side middleware, and TypeScript improvements. It also warns developers about changes in Next.js 16.

    • Turbopack: An incremental, Rust-based bundler replacing Webpack, used in Vercel applications. Can be opted into with next build --turbopack, showing 2x to 5x faster compilation times across project sizes. Built projects serve similar or less JavaScript and CSS with fewer requests.
    • Stabilized Node.js Middleware Runtime: Allows middleware to run with full Node APIs, opening new patterns. NodeJS runtime not default in Next 16 but may be in future versions.
    • TypeScript Improvements: Makes typed routes stable, introduces route export validation and helper types (PageProps, LayoutProps, and RouteContext), and adds a next typegen command.
    • Linting Changes: Deprecates next lint command in favor of explicit linter configurations (ESLint or Biome). Automatic linting during builds will be removed in Next.js 16.
    • Deprecation Warnings: Aims to smooth the jump to Next.js 16 by surfacing compile-time or build warnings for legacy items like legacyBehavior in next/link, AMP, and next/image behavior.
  • Community Reaction: Generally positive. Many developers consider it a solid update, with typed routing and removing implicit build-time checks being highlighted. Some saw 20% time improvements using Turbopack.
  • About Next.js: An open-source React framework by Vercel, providing an opinionated architecture for full-stack web applications with features like file-system routing, SSR, SSG, API routes, and built-in performance optimizations.
阅读 14
0 条评论