Rationale for dropping ModuleImport syntax?

Marius Gundersen gundersen at gmail.com
Tue Jun 10 00:13:00 PDT 2014

On Tue, Jun 10, 2014 at 9:06 AM, Domenic Denicola <
domenic at domenicdenicola.com> wrote:

> From: es-discuss [mailto:es-discuss-bounces at mozilla.org] On Behalf Of
> Marius Gundersen
> > This will likely lead to a lot of confusion, not only for module makers
> but also for module consumers.
> Agreed. Which is why I predict module makers will, at the encouragement of
> module consumers, stick to default-export only, since it is more in line
> with existing practice.

That works around all of the static analysis made possible by the current
spec. It is impossible to do static analysis on a defaultExported object.
It would be unfortunate if all the time and effort spent on making module
exports statically analysable is for nothing simply because the real world
finds another way to use modules.

I'd say we only support named exports, something like this:

Marius Gundersen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140610/3991fb06/attachment.html>

More information about the es-discuss mailing list