ES6 modules (sorry...)

Kevin Smith zenparsing at gmail.com
Mon Jun 16 15:11:09 PDT 2014


> The other big concern here is that in production, very few people are
> going to be loading every JavaScript file asynchronously.  If there's
> magic, there needs to be a reasonable way to handle bundling multiple ES6
> files together.
>

OK, so there are two issues here:

1. How do you bundle modules together in an all-ES6 world?

There used to be lexical modules, and they made bundling really effortless.
 I believe that you can still do a fair approximation of bundling without
lexical modules, but I haven't created a proof-of-concept yet.

In my opinion, lexical modules should not have been dropped.

2. How do you bundle modules for use in pre-ES6 worlds?

The short answer is:  the way that es6now does.  Basically, you give up
some support for cyclic dependencies and remotely-updatable exports.  But
remember, we don't want to limit the ES6 module system to only what can be
easily transpiled into ES5.  If the most important parts can, then we're
all good.

Kevin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140616/eba488b2/attachment.html>


More information about the es-discuss mailing list