OpenAINext.jsJun 27, 2018, 7:50 PM

Next.js 6.1

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 6.1

Key Points

  • react-hot-loader removed
  • auto hot-reload for custom page extensions
  • url-to-withrouter codemod

Summary

Next.js 6.1 is a production-ready release focused on more reliable hot reloading, codebase cleanups, and tooling to simplify upgrades. It also open-sources nextjs.org and prepares for upcoming platform improvements (Webpack 4, serverless optimizations).

Key Points

  • Removed react-hot-loader as a dependency to make development behaviour closer to default React while preserving Next.js' built-in hot reload.
  • Hot reloading for custom page extensions (e.g. .ts/.tsx) is now automatic: adding extensions via pageExtensions in next.config.js applies the hot-self-accept-loader automatically.
  • Output layout and repo cleanup: server/build moved to top-level build; .next/dist renamed to .next/server; shared constants consolidated; Flow types added across the codebase.
  • next-codemod: provides automated codemods to help upgrade deprecated patterns. The first codemod (url-to-withrouter) rewrites usages of the injected url prop to use withRouter.
  • nextjs.org is now open source, inviting contributions and examples from the community.
  • Forward-looking: work to adopt Webpack 4 (faster builds, better code-splitting) and create a slimmed down next-server for serverless/cold-start use cases.

Upgrade notes (practical steps)

  • Replace this.props.url usage with withRouter or run the codemod: jscodeshift -t ./url-to-withrouter.js pages/**/*.js
  • If you use TypeScript or other compile-to-js page extensions, add them to pageExtensions in next.config.js; Next.js will handle hot reloading for those extensions automatically.
  • Build output paths changed: look under .next/server for pre-rendering/server files and expect server/build → build movement when inspecting the repository.
  • Test app behaviour in dev and prod after upgrading to ensure lifecycle behavior (e.g. shouldComponentUpdate) matches expectations now that react-hot-loader is removed.

Full Translation

Translations

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

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

Next.js 6.1

Next.js 6.1

Next.js 6.1 は、開発における信頼性と一貫性の向上を主な特徴とするリリースです。

主なポイント

  • 開発環境での信頼性の改善
  • 開発ワークフローの一貫性向上

概要

このリリースは、開発中に発生する問題を減らし、開発プロセス全体でより安定した挙動を提供することを目的としています。