Next.js10.2.3から11.1.0に更新

公開日時

このブログをNext.js10.2.3から11.1.0に更新した。

ビルド時に↓のエラーが出ていたので、

yarn build

Build error occurred
Error: `future.webpack5` in `next.config.js` has moved to the top level `webpack5` flag https://nextjs.org/docs/messages/future-webpack5-moved-to-webpack5

エラー内容に沿って next.config.js の設定を変更した。

// before
const nextConfig = {
  future: { webpack5: true }
}

// after
const nextConfig = {
  webpack5: true
}

Dependabotのおかげで継続的なライブラリ更新が習慣化できていて良い。


Related #next.js