developit / developit/microbundle

How to target browsers with es6 support?

Aperta
#942 4 commenti 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
8.1k
Fork
358
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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 to `defaults`)
- `defaults and supports es6 and supports async-functions` → fails with an `error 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?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.