-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Description
This is documentation about how we solve the following (as mentioned by @zanonnicola and @jon-stevens elsewhere):
If you use async/await for example the code generated by Babel is bloated and slower than native version. What I mean is to ship to modern browser is highly optimised native code.
...you can send your es6 bundle to modern browsers and an es5 bundle to older ones?
Are you thinking about this?
<script type="module" src="main.mjs"></script>
<script nomodule src="main.es5.js"></script>
...you're still using Rollup (or whatever) to bundle everything together, but you create one version of that bundle that isn't transpiled, and another that isn't?
Yeah, after rollup does it's thing I use closure-compiler to transpile it into an es5 bundle.
If that seems like that is a good way forward, we should document it (and how to do it).