Transitioning to modern JavaScript
summary
Claim: legacy dependency code is one of the biggest web performance problems today, causing roughly 80 PB/month of extra bandwidth and an estimated 54,000 metric tons CO2. Measured examples show an async arrow function (21 bytes) transpiles to ~7 KB and executes >6× slower (62 VM instructions vs ~1100). NPM analysis finds median package syntax is ES5, <25% use newer syntax, and only ~9–11% use module/browser fields. Practical fix: publish modern exports, target ES2017 sweet spot, and ship dual bundles via module/nomodule or transpile built bundles.
AI-written summary · about
chapters (13)
- 0:00Start
- 1:42Modern JavaScript
- 2:34Classes
- 2:59Block Scoping
- 3:15Destructuring
- 4:35Transpilation
- 6:35Which JavaScript?
- 6:59Estimated cost of Legacy JavaScript
- 8:03Why legacy is the default on npm
- 11:092. Need to support IE11? Opera Mini?
- 11:45Option 1: Compile Twice
- 12:45is a tax you don't have to pay
- 13:02Optimal bundle configurations
related talks
26mWeb Performance in modern JavaScript world
35mBrowser Package Management
21mAsk not what JavaScript can do for you
11mRevolutionizing JavaScript Performance
23mThe third age of JavaScript: Three years in
58m10KB or Bust: The Delicate Power of Webpack and Babel
36mES6 Modules & HTTP/2 - Will We Stop Packaging Our JavaScript Code?
34mTowards a simpler JavaScript ecosystem
