- Early work by Ihab Awad (Google) and Kris Kowal (FastSoft)
- 2009-09: 2nd draft of module strawman, still very close to "closures as modules",
export x = 42
- 2010-10: Simple modules, lexical modules (
module M { export var x = 42; }
) - 2011-09: TC39 side of an ES6 loader spec
- 2012-02: V8 implements original module spec (inline module blocks!)
- 2012-11: A variant that's more closely aligned with node's
module.exports
object is suggested - 2013-02: The discussion on how
module.exports = x
("single export") would translate becomes more prominent - 2013-03: Yehuda Katz assembles a more general gap list against existing module usage
- 2013-05:
export default
is presented at TC39 and lexical modules are no more - 2013-11: Module becomes a clean parse goal
- 2013-12: ES6 spec still includes a loader
- 2014-07: jsmodules.io starts on the long and hard road to get ecosystem buy-in
- 2014-09: WHATWG officially takes over working on an ES6 loader spec
- 2015-01: V8 starts implementing the revised module spec ("modules as a different top-level parse goal")
- 2015-05: First rollup.js release
- 2015-06: ES2015 brings static
import
/exports
but actual loading left open to hosts - 2016-01: WHATWG specs loading of relative and absolute paths as part of
<script type="module">
- 2016-09: Dynamic
import()
is born (ability to dynamically load modules) - 2016-12: Webpack 2 ships and includes an implementation of modules (mostly just using module syntax w/ custom semantics for bundling)
- 2017-01: WHATWG officially marks the loader spec as "not likely in its current form"
- 2017-05:
import.meta
is born (access to module-specific meta data) - 2017-08:
@std/esm
aims to provide a true polyfill for module support in node - 2017-10: WHATWG spec adds
import.meta.url
- 2017-10: V8 implements dynamic
import()
- 2017-11: V8 implements
import.meta
- Basic support in some browsers
- Chrome 64
- Basic support for relative and absolute URLs
- Dynamic import: both scripts and modules
import.meta
properties:url
- Bare imports: nope
- Loader hooks: none
- Edge 16
- Basic support for relative and absolute URLs
- Dynamic import: in progress
import.meta
properties: not implemented- Bare imports: nope
- Loader hooks: none
- Firefox Developer Edition w/
dom.moduleScripts.enabled=true
- Basic support for relative and absolute URLs
- Dynamic import: not implemented
import.meta
properties: not implemented- Bare imports: nope
- Loader hooks: none
- node 8 w/
--experimental-modules
- Basic support for relative and absolute URLs (
file://
protocol only) - Dynamic import: both scripts and modules on node 10.x nightly, requires additional
--harmony-dynamic-import
flag import.meta
properties: none, blocked on stable V8 6.4 in Jan 2018- Bare imports: using
node_modules/
rules - Loader hooks: Via
--loader <impl>
- Basic support for relative and absolute URLs (
- Safari Technology Preview 45
- Basic support for relative and absolute URLs
- Dynamic import: both scripts and modules
import.meta
properties:url
- Bare imports: nope
- Loader hooks: none
- 2018-04 (projected): Complete implementation in node.js, although likely still requiring some flags at launch
- Standardization of
.mjs
for JavaScript module files - Unbundled execution for development (?)
- Top-level await (?)
- Integrity hashes, nonce, ... for static and dynamic import (?)
- Official loader hooks (e.g. "bare" imports) on web (?)
- Named/mapped base URLs: whatwg/html#3161
- More generic request data -> request hook: whatwg/html#2640
- Webpack 4 most likely supports a "real" module mode, e.g. dynamic import reliably returns a namespace object
- Integration with WebAssembly
People who provided links & resources (alphabetical order):
More from the recent node.js module summit: https://docs.google.com/document/d/1zRBUQNch5ADatj1Do3vJ4YqkdYhjKFekhCpXceBeJFk/edit#heading=h.w0ogtr7bmh8t