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

Support async/await #51

Closed
lacker opened this issue Jul 21, 2016 · 7 comments
Closed

Support async/await #51

lacker opened this issue Jul 21, 2016 · 7 comments

Comments

@lacker
Copy link
Contributor

lacker commented Jul 21, 2016

We'll want to support it eventually, the only question is when.

In #43 @gaearon stated

Not adding async yet because I’ll need to understand its stability better before doing it.

so that's the status quo.

@gaearon
Copy link
Contributor

gaearon commented Jul 21, 2016

We’ll also need to choose our stance on polyfills. Do we leave it to user to polyfill Promise?

@insin
Copy link
Contributor

insin commented Jul 21, 2016

Will anyone be likely to be using async without fetch() (and a polyfill for it)? The most popular polyfill for it requires you to bring your own Promise polyfill, as does axios.

Will the runtime transform be used to inject the regenerator runtime only when needed? It also does local polyfilling, but you can configure that off.

@gaearon
Copy link
Contributor

gaearon commented Jul 21, 2016

To be honest I’m not familiar with all these tradeoffs so it’s hard for me to say. 😄
What do you think would be good defaults?
I want to make it easy to get started with common code samples but also to avoid crazy bundle size.

@insin
Copy link
Contributor

insin commented Jul 21, 2016

This might be a decent default for async/await support in addition to the plugin for transforming the syntax into generators - it will pull in the regenerator runtime only if async/await is used (and will also import babel-runtime helpers instead of duplicating them in each module they're needed in) while leaving polyfilling entirely in the hands of users.

["babel-plugin-transform-runtime", {
  "polyfill": false,
  "regenerator": true
}]

@gaearon
Copy link
Contributor

gaearon commented Jul 21, 2016

Would you like to make a PR adding a sensible async support setup?

@kennetpostigo
Copy link

I think #327 adds support for this. Is it okay to close this?

@gaearon gaearon added this to the 0.3.0 milestone Aug 2, 2016
@gaearon
Copy link
Contributor

gaearon commented Aug 2, 2016

Yep, thanks!

@gaearon gaearon closed this as completed Aug 2, 2016
@gaearon gaearon removed this from the 0.3.0 milestone Sep 1, 2016
@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants