ES6 Modules & HTTP/2 - Will We Stop Packaging Our JavaScript Code?
summary
Explains how native ES6 modules (supported by about 99% of modern browsers) let JavaScript be modular and enable tree‑shaking, and reports experiments comparing three build strategies: transpiled ES5 bundle, non‑bundled ES6 modules, and concatenated ES6 bundle. Finds concatenated ES6 bundles are smallest and fastest to execute, while serving many non‑bundled ES6 modules can hurt load time today; recommends using Rollup/Babel for fallbacks and combining type="module" with a legacy bundle. Notes that HTTP/2 server push plus service workers complicate caching and rarely outperform simple concatenation.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 1:27JavaScript modules history
- 5:14ES6 modules syntax
- 9:25ES6 modules pros/cons
- 11:50Classic vs modules
- 21:01ES6 in browser
- 24:34Unpackaged in production?
- 27:02HTTP/2 and modules
- 31:35Production strategy
- 34:23Conclusion
related talks
33mES6 Modules in the Real World
58m10KB or Bust: The Delicate Power of Webpack and Babel
01h 10mThe future of JavaScript modules: JS module blocks and native bundling
35mBrowser Package Management
34mBuild-time Optimizations in JavaScript Applications
36mUnbundling the JavaScript module bundler
14mTransitioning to modern JavaScript
56mComponents and Modules
