A complete tour of JavaScript modules — the historical landscape (IIFE, AMD UMD, CommonJS), modern ES modules (export/import, default vs named re-exports dynamic import), interop between ESM and CJS in Node, package.json exports and how TypeScript and bundlers fit in.
Disclosure: Some links on this page may contain affiliate links. If you make a purchase through these links, we may earn a small commission at no extra cost to you. See our Affiliate Disclosure for details.