Rationale for dropping ModuleImport syntax?

Forbes Lindesay forbes at lindesay.co.uk
Tue Jun 10 06:27:17 PDT 2014


> Please, cosmetic changes only!  : )


Fair enough.  In that spirit, how about we keep the functionality that was recently dropped, but fix the strange wording of it (a cosmetic change) so that it becomes:


```js

import 'underscore' as _;

```


as has been suggested by other people.  It's not ideal, but we then end up with three ways of importing a module:


Single default export:


```js

import mkdirp from 'mkdirp';

```

Many named exports:

```js
import 'underscore' as _;
```

Individual named exports:

```js
import {map} from 'underscore';
```

That is a small cosmetic change (relative to what was the proposal until a few days ago) but, I believe, provides all the required functionality.  This has already been proposed by others in this thread, and i don't think I've seen any meaningful criticism of the idea?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140610/7ed12e15/attachment.html>


More information about the es-discuss mailing list