~/talk

ES Modules in Node JS

Talkat Infobip Shift 2021 · 2021-09-07..09-08· [nodejs, javascript]
slides:none on file

Node v12 ships unflagged ESM after the spec (June 2015) and Node implementation (Nov 2019), and the talk argues the actual change is a semantics break: Node chooses browser-style ESM, not CJS resolution. Concrete effects include node-fetch moving to ESM-only and D3 plus two orgs representing about 2,000 packages shifting, causing CJS consumers to need async workarounds. Workable tools and fixes are listed: Babel/TypeScript transpile, webpack/rollup integrations, import maps, the package.json exports field and conditional exports, top-level await works, Jest currently lacks ESM support.

AI-written summary · about

  1. 0:00Introduction to ES modules
  2. 3:24Module ecosystem challenges
  3. 5:31Browser and tool compatibility
  4. 8:44Native ESM and Node.js rifts
  5. 12:00Bridging modules
  6. 14:21Bare specifiers and import maps
  7. 16:33Asynchronicity in ESM
  8. 20:48Top-level await
  9. 22:35Conditional exports
  10. 27:51Migration roadmap
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.