website icon indicating copy to clipboard operation
website copied to clipboard

Update next 14

Open snigdha-kansal opened this issue 1 year ago • 0 comments

Overview

Resolves #409 Updated next version from 12.3.1 to 14.2.3 The react and react-dom were updated to their corresponding compatible versions as well.

Changes

  • Starting with Next.js 13, <Link> renders as <a>, so attempting to use <a> as a child is invalid. The new-link codemod automatically upgraded previous version of Next.js to the new <Link> usage. All link elements of the form <Link><a id="link">Home</a></Link> were changed to <Link id="link">Home</Link>. [Reference Link]
  • Starting in Next.js 13, the next/image component has undergone some major changes. These include removing the layout prop in favor of style or className to add support for canonical style prop. The next-image-to-legacy-image codemod automatically changed next/image imports to next/legacy/image. [Reference Link]
  • next.config.js
    • images.domains has been deprecated and replaced by images.remotePatterns.
    • image.target is no longer supported. Instead, image.output is used to create self-contained builds suitable for serverless and other deployment scenarios.
  • .yml files and .nvmrc were updated to enable Node.js 18.x which fully supports Next.js 14.
  • craCompat was removed as it is no longer required.

Possible Changes

  • next/legacy/image can be upgraded to the new next/image once a stable version of the codemod for it has been developed.

snigdha-kansal avatar May 19 '24 01:05 snigdha-kansal