~/talk

Node Es Modules - Something Almost, but not Quite Entirely Unlike Commonjs

Talkat NodeConf EU 2018 · on Monday, 2018-11-05· [nodejs, javascript]
slides:none on file

NodeJS is adding native ES Modules with concrete rules: files ending .mjs are ESM, .js remain CommonJS; ESM uses export/import, CJS uses require. ESM gives live bindings (imports stay synced) and does static asynchronous loading so dynamic import returns a Promise, changing execution order. Interop is limited: ESM can default-import CJS, CJS must use dynamic import for ESM. Migration options include codemods, renaming files to .mjs, or publishing dual-mode libraries by compiling ESM to companion CJS outputs with Babel. Experimental flag remains.

AI-written summary · about

  1. 0:00Intro
  2. 0:30ES Modules
  3. 2:06File extensions
  4. 3:47Named exports
  5. 4:31Default exports
  6. 5:52Export variables
  7. 7:19Binding
  8. 17:05Migration
~/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.