Extra Special Modules
summary
Node.js ships a new ESM implementation in 12.x with plans to unflag for LTS; it supports .mjs or "type":"module" packages, dynamic import and top-level await, but cannot be required synchronously from CommonJS yet (no require of ESM). Package exports and conditional exports create explicit public entry points and allow different browser/node entries; import maps are proposed to align browser resolution with Node’s bare imports. Limitations include mandatory file extensions, no folder index resolution, experimental JSON imports, and ongoing work on self-referential modules.
AI-written summary · about
chapters (6)
- 0:00Start
- 13:28NODE.JS'S CJS RESOLUTION ALGORITHM SUPPORTS
- 16:57MODULE GOAL HAS EXTRA GRAMMAR CHANGES
- 18:18POTENTIAL FUTURE GOALS
- 18:52LEXICALLY SCOPED VARIABLES INCLUDE
- 21:41WHAT ARE THE LIMITATIONS
related talks
32mES Modules in Node JS
26mNode Es Modules - Something Almost, but not Quite Entirely Unlike Commonjs
32mPlease Wait... Loading: A Talk of Two Loaders
48mTomorrow's ES modules today
22mPlease wait... loading: a tale of two loaders
30mShipping Node.js packages in 2025
24mNavigating the Wild Seas of Native ES Modules
46mThe journeyman’s guide to modules in Node.js
