naopoyo.com
  • Docs
  • Tags
  • Bookmarks
  • Tools
  • About
  • Docs
  • Tags
  • Bookmarks
  • Tools
  • About

目次

© naopoyo

🚩

Next.js 16にアップグレードする

公開日
約3時間後
2025-10-24
更新履歴
GitHubで見る
  • Next.js

簡易手順

Terminal
npx @next/codemod@canary upgrade latest

ES Lint の設定ファイルを更新

FlatCompat を使わなくなっているので以下のように修正する

eslint.config.mjs
import { defineConfig, globalIgnores } from "eslint/config";
import nextVitals from "eslint-config-next/core-web-vitals";
import nextTs from "eslint-config-next/typescript";

const eslintConfig = defineConfig([
  ...nextVitals,
  ...nextTs,
  // Override default ignores of eslint-config-next.
  globalIgnores([
    // Default ignores of eslint-config-next:
    ".next/**",
    "out/**",
    "build/**",
    "next-env.d.ts",
  ]),
]);

export default eslintConfig;

'use cache' を使うための設定

next.config.ts
// ...
const nextConfig: NextConfig = {
  // ...
  cacheComponents: true,
  // ...
}
// ...

ブックマーク

Upgrading: Version 16 | Next.js
Upgrade your Next.js Application from Version 15 to 16.
nextjs.org favicon
nextjs.org
Upgrading: Version 16 | Next.js

目次

最近更新された記事

🙄
開発日記-2025-10-23 / jsdom v27.0.1 にすると vitest がエラーになる
約3時間後 - 2025年10月24日
  • 開発日記
🛗
Rubocop個人的まとめ
2日前 - 2025年10月21日
  • Ruby
  • Rubocop
🌑
Railsを7から8にアップグレードする
4日前 - 2025年10月19日
  • Ruby
  • Rails