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.