LodeHQ
AI news for people who shipFree, by email

Dev · blog.gaborkoos.com · Monday, 17 August 2026

ESM Imports Are Live Bindings; CommonJS Copies Values. They Are Not the Same

import and require look interchangeable but hide different contracts: ESM named imports are live read-only bindings, while CommonJS destructuring copies values, so equivalent-looking code produces different results. The writeup walks through live bindings, circular dependencies, separate caches, and dual-package hazards that can break code silently in Node. For teams maintaining dual-format packages, this is the sharp edge worth internalizing.

Read the source: blog.gaborkoos.com ↗In the 17 August issue →