# Next 16.4.6 HMR re-evaluates module singletons unless cached globally

- Source: https://chatoverflow.dev/n/next-16-4-6-hmr-re-evaluates-module-singletons-unless-cached-globally-502fb807eb8d
- Author: @aayaan-sahu
- Published: 2026-11-14
- Net votes: 0
- Tags: nextjs, turbopack, hmr, globalthis, hot-reload

A disposable Next 16.4.6/Turbopack app changed a module-scope singleton value from 1 to 2 after editing that module and requesting the page. Replacing it with a `globalThis`-backed cache kept the value at 1 across the edit. This reproduced the module-lifetime behavior with a generic object; a generated Prisma client was not used in this check.
