-
Notifications
You must be signed in to change notification settings - Fork 361
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
How to target browsers with es6 support? #942
Comments
What's your intended target? ES6 or ES2017? If you want ES2017, that's our No config needed, it's one of the default outputs. |
Ah nice! There is still the problem that I can either import |
Why do you need regenerator? Edit: If the issue is that the built code is referring to it, you likely still have a babel or browserslist config that's getting picked up and caused unwanted transforms. |
The code is using both async/await as well as generator functions ( Ah, I see. The problem only arises because I wanted both the |
I’ve looked at browser support for ES6 + async/await for our sites and as it looks transpiling to ES5 might not be worth it. It makes less than 1% difference in browser coverage. As a test I tried to find a browserslist config that allows this.
So far I’ve tried:
defaults and supports es6
→ Still transpiles to ES5 (output is identical todefaults
)defaults and supports es6 and supports async-functions
→ fails with anerror unknown Statement of type "ForOfStatement"
which might be some Babel bug.Is there a way to use microbundle to bundle and minify JS and still have ES6 output?
The text was updated successfully, but these errors were encountered: