2
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?

More than 1 year has passed since last update.

Docker上でNext.jsのホットリロードではまった

2
Posted at

解決策

package.jsonに下記を追加

package.json
"scripts": {
    "dev": "WATCHPACK_POLLING=true next dev",
    ...
}

※環境構築時にデフォルトでdevが「next dev --turbopack」となっていた。
Docker上で「WATCHPACK_POLLING=true next dev --turbopack」だとホットリロードが効かない。「--turbopack」の有無でファイル変更検知の仕組みが変わるのが原因らしい。

2
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
2
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?