0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

DockerでNext.jsのコンテナを作成した時にホットリロードで詰まった話

Posted at

DockerでNext.jsのコンテナを作成した時にホットリロードで詰まった話

前提条件

  • 前回Next.jsでWebサイトを開発したときはローカル環境で行ったので、次のステップとしてDockerコンテナを利用して開発したかった
  • Windows11
  • Next.js Docker ともに初心者レベル

原因

  • package.json の以下の部分の --turbopack を消すこと
  "scripts": {
  "dev": "WATCHPACK_POLLING=true next dev",
  "dev": "WATCHPACK_POLLING=true next dev --turbopack",
    "build": "next build --turbopack",
    "start": "next start",
    "lint": "eslint"
  },

まとめ

next.config.ts にコードを書くとかいろいろな情報が出てきたけどこれが原因だったようでした。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?