ModuleImport

C. Scott Ananian ecmascript at cscott.net
Mon Jun 30 13:10:06 PDT 2014


On Jun 30, 2014 3:59 PM, "Karolis Narkevičius" <karolis.n at gmail.com> wrote:
> In fact, doesn't being able to import things like above make es6 modules
already interoperable with CJS?

Almost, but not quite, since the name of the module itself ($, fs, etc) is
not included in a typical commonjs module.  So it would really be:
```
import {_ as $} from "jquery";
// etc
```
And from here the jump to "default import" as a small syntactic improvement
on this seemed clear. (At the time at least.)
  --scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140630/01612695/attachment.html>


More information about the es-discuss mailing list