Yes, that syntax is incorrect and confusing.

There was an overside from our end to provide a way to re-export only the 
default export from another module, and this is something we plan to revisit 
for ES7/2016. Probably something like this: 

     `export default from “foo”;`

this is just sugar for:

     `export {default} from “foo”;`

which is perfectly supported in ES6, including the ability to rename it: 

     `export {default as something} from “foo”;`

/caridy

> On Feb 18, 2015, at 9:08 PM, Jason Kuhrt <jasonku...@me.com> wrote:
> 
> I was prompted to bring this issue to es-discuss.
> 
> https://github.com/babel/babel/issues/826 
> <https://github.com/babel/babel/issues/826>
> 
> It is my confusion about why this syntax does not work:
> 
> export foo from ‘./foo'
> 
> More details are in the issue but the gist is that sometimes it is actually 
> quite handy to export just defaults internally and then re-export thing as a 
> “bag” of named exports. This is not currently “easy”. I assume this was 
> discussed/considered. I’d be curious what the rationale was.
> 
> Thanks!
> Jason
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to