Open IamCarbonMan opened 6 years ago
Yes, we can't express export default x
now. I'm using export default: x
for default export, this compiles to export {x as default}
, and it can be imported by import 'path/to/module': x
. rollup and webpack are also happy with this.
There are some possible ways to implement this:
export x, y, z
is not implemented yet, we can make export x.y z
compiles to export default x.y(z)
, but If we choose this, then we can't use named exports without braces like this: export x, y, z
to export {x, y, z}
export default
doesn't parse now, we add this to the grammar like CoffeeScript 2 does, make export default something
compiles as-is.Add your reaction with laugh to vote 0, hooray to vote 1.
Any ideas?
There is no way to set the default ES6 export.
export {x as default}
is not the same asexport default x
.