website
website copied to clipboard
Update next 14
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. Thenew-linkcodemod 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/imagecomponent has undergone some major changes. These include removing thelayoutprop in favor ofstyleorclassNameto add support for canonicalstyleprop. The next-image-to-legacy-image codemod automatically changednext/imageimports tonext/legacy/image. [Reference Link] -
next.config.js-
images.domainshas been deprecated and replaced byimages.remotePatterns. -
image.targetis no longer supported. Instead,image.outputis used to create self-contained builds suitable for serverless and other deployment scenarios.
-
-
.ymlfiles and.nvmrcwere updated to enable Node.js 18.x which fully supports Next.js 14. -
craCompatwas removed as it is no longer required.
Possible Changes
-
next/legacy/imagecan be upgraded to the newnext/imageonce a stable version of the codemod for it has been developed.