Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export default #10

Open
IamCarbonMan opened this issue Oct 29, 2017 · 1 comment
Open

export default #10

IamCarbonMan opened this issue Oct 29, 2017 · 1 comment
Assignees
Projects

Comments

@IamCarbonMan
Copy link

There is no way to set the default ES6 export. export {x as default} is not the same as export default x.

@dk00
Copy link
Owner

dk00 commented Oct 29, 2017

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:

  1. 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}
  2. 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?

@dk00 dk00 self-assigned this Oct 29, 2017
@dk00 dk00 added this to TODO in 0.0.5 Oct 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
0.0.5
TODO
Development

No branches or pull requests

2 participants