title: '更新nextjs到13' date: '2023-08-20' tag: ["blog"]

  • 升級nextjs版本:pnpm up next react react-dom eslint-config-next --latest
  • 自動更新image import:npx @next/codemod@latest next-image-to-legacy-image .
    • 會更新 next/image -> next/legacy/image
  • 更新link:npx @next/codemod@latest new-link .

記錄一下目前部落格的樣貌

Ref

  • https://chakra-ui.com/docs/components/link/usage#usage-with-nextjs
  • https://nextjs.org/docs/pages/building-your-application/upgrading/codemods#new-link
  • https://nextjs.org/docs/pages/building-your-application/upgrading/version-13
  • https://nextjs.org/docs/pages/building-your-application/upgrading/codemods#next-image-to-legacy-image