~/talk

ES6 Modules in the Real World

Talkat Polymer Summit 2017 · 2017-08-22..08-23· [javascript, web-platform]
slides:none on file

ES6 modules are production ready in modern browsers and enable faster edit refresh cycles and a clean modern code path while older browsers get an ES5 fallback via transpilation. Recommended toolchain uses Rollup to bundle and tree shake then Babel to transpile for legacy targets. Practical details include the nomodule/Safari 10.1 bug workaround, imports run once and are hoisted, circular imports work if top-level work is avoided, and you can bridge CommonJS via a support file plus Rollup commonjs plugin; dynamic import returns a Promise and needs a base path when polyfilled.

AI-written summary · about

  1. 0:00Start
  2. 15:21Module execution
  3. 16:45Export vs side-effects
  4. 17:49Modules are deferred
  5. 19:18Modules, hoisted
  6. 23:24Option: rollup commonJS
  7. 30:02Source Graph
  8. 30:43Import function
~/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.