~/talk

ESM Loaders: Enhancing Module Loading in Node.js

Talkat JSNation 2023 · on Monday, 2023-06-05· at 18:50· [nodejs, javascript]

Claims that ESM loaders let Node.js change resolution and loading phases and shows working code: a tiny overrides.json mapping loader that redirects specifiers, an HTTP loader using fetch to pull from esm.sh, and a TypeScript loader that runs esbuild transpile on the fly. Examples run with --loader, chain together (HTTP + TS + overrides), and mostly work; some edge cases require Node 20 resolver fixes and fuller error handling but the demos succeed.

AI-written summary · about

  1. 0:00ESM loaders in Node.js
  2. 1:14What is ESM and module loading
  3. 3:02Module execution phases
  4. 4:03Module loaders for resolution
  5. 5:26Overriding modules
  6. 8:38HTTP and TypeScript loading
  7. 13:37Specifier types in loaders
  8. 16:06TypeScript transpiling
  9. 17:30Chaining loaders
  10. 20:16Summary and future
~/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.