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

feature request: arrow function transformation #182

Closed
MathGeniusJodie opened this issue Jun 18, 2020 · 6 comments
Closed

feature request: arrow function transformation #182

MathGeniusJodie opened this issue Jun 18, 2020 · 6 comments

Comments

@MathGeniusJodie
Copy link

it's the only thing preventing me from switching from babel really

@evanw
Copy link
Owner

evanw commented Jun 18, 2020

The minimum language target for esbuild is set at ES6, which supports arrow functions. It's not possible to set the language target to ES5. I'm currently not intending for esbuild to be able to target below ES6, at least not while there's still a lot of remaining work to do for transforming syntax for ES6 and up.

You might want to look at other tools for this. I've heard that swc is trying to be a faster implementation of Babel, so it might be a good replacement for you.

@tooolbox
Copy link
Contributor

Hm, could be worth doing a survey:

  • How many people aren't using esbuild because it doesn't convert X feature of ES2019 down to ES6?
  • How many people aren't using esbuild because it doesn't convert X feature of ES6 to ES5?

Personally I most need async/await lowering, but generally I would fall in the latter camp; I care more about supporting older browsers than things like async generators or bigints.

Aside from speed, what's most exciting about esbuild is its potential to centralize the entire build process into a single tool. I think ditching Babel is less about the speed increase and more about the toolchain simplicity.

@MathGeniusJodie
Copy link
Author

MathGeniusJodie commented Jun 19, 2020

I'll just use esbuild for projects that don't need to support ie then, thanks ^^

@evanw
Copy link
Owner

evanw commented Jun 21, 2020

Personally I most need async/await lowering

FYI I just implemented this in version 0.5.8 (see also #137).

Edit: well, only down to ES6.

@evanw
Copy link
Owner

evanw commented Aug 3, 2020

I'm going to close this in favor of #297 which is more general.

@tooolbox
Copy link
Contributor

🤯

(take note, @MathGeniusJodie)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants