The Importance of import and export
summary
Argues that ES2015 import/export gives live bindings that fix CommonJS pain points: eval abuse, circular dependency fragility, module.exports confusion, and impossible dead‑code elimination. Shows concrete wins: patching strategies like graceful-fs work with live imports, bundle tool rollup can produce ~4x smaller output by tree‑shaking, and practical rollout advice—publish ES2015 sources to npm and add jsnext:main. Mentions transpilers (Babel), Meteor 1.3 support, and a starter repo to try today.
AI-written summary · about
chapters (7)
- 0:00Intro
- 1:26Let's talk about eval
- 7:36How code is loaded
- 9:21Problem 2: Dependency cycles
- 16:51A native module system...
- 19:44So how does it work?
- 23:29Multiple exports?
related talks
34mTowards a simpler JavaScript ecosystem
33mES6 Modules in the Real World
30mJohn-David Dalton - SeattleJS Conference 2017
48mESM: EcmaScript Modules in browser and NodeJS. It's about time!
47mNative JavaScript Modules: import {Browsers, Node.js}; export {production};
31mECMAScript Modules: Past, Present, and Future
52mES2015: Using tomorrow's JavaScript today!
26mNode Es Modules - Something Almost, but not Quite Entirely Unlike Commonjs
