For some reason those file changes are only being recognized inside of the Docker container when making Watchpack poll for file changes.
(This probably varies depending on what filesystem driver is being used; OrbStack and Docker Desktop might use different approaches here. But with this change all systems should be happy; and polling every 1000ms is just fine; this is not a file expected to be changed very often.)
Before this change the Docker container running
npm run dev
would not detect changes being made to thenext.config.js
file.Unlike the bundled hot reload of actual app files (like code in /pages, /lib, ...) Next.js uses Watchpack to watch for file changes inside the config file: https://github.com/vercel/next.js/blob/62ab0e33a2988989c67b9b7e429874d4cbc0473f/packages/next/src/server/lib/start-server.ts#L336-L359
For some reason those file changes are only being recognized inside of the Docker container when making Watchpack poll for file changes.
(This probably varies depending on what filesystem driver is being used; OrbStack and Docker Desktop might use different approaches here. But with this change all systems should be happy; and polling every 1000ms is just fine; this is not a file expected to be changed very often.)