
下午將公司專案從 NEXT 12 昇到 NEXT 13,NEXT 版更真的很快,在NEXT 13 替大家帶來了
## 實測建置效能
實測網站建置 (npm run build) ,將近快了1倍
NEXT JS 12 local build 1 分 40 秒
NEXT JS 13 local build 56 秒
昇級 NEXT JS 13,有明顯渲染頁面效能上的改善。
import Image from 'next/image';
<Image
loader={cloudflareLoader}
src={contentURL + item.Image}
width={600}
height={350}
></Image>
<Image
alt=""
loader={cloudflareLoader}
src={contentURL + item.Image}
width={600}
height={350}
style={{
width: '100%',
height: 'auto',
}}
></Image>
<Image
alt=""
loader={cloudflareLoader}
src={contentURL + item.Image}
width={600}
height={350}
sizes="100vw"
style={{
width: '100%',
height: 'auto',
}}
></Image>
import Image from next/legacy/image
<Link href="/about"> <a>About</a> </Link>
<Link href="/about"> About </Link>
P.S. 修改 next config ,可維持 next 12寫法(不推薦,因為修正了連結的錯誤)
experimental: {
newNextLinkBehavior: false,
},