No clue why, but HMR stopped working.
HINT: If you directly run webpack in dev mode
~/cocalc/src/packages/next$ pnpm exec next dev
▲ Next.js 13.5.6
- Local: http://localhost:3000
then visit http://localhost:3000, then HMR does work.
So the problem is somehow interaction between the hub express server and nextjs.