glimmerjs/glimmer-build

es5 modules do not transpile async/await

lukemelia opened this issue · 2 comments

The set of babel plugins used to generate the es5 modules build leaves async/await untouched, which means that the resulting es5 code will not run on IE <= 11, Mobile Safari <= 10.2, and Android <= 4.4.

There is a cost to support these older browsers that may not be worth it. However, it came as a surprise to me that an es5 build might not work in these environments.

Maybe the es5 build should include @babel/plugin-transform-async-to-generator and try to get generators working in es5.

It seems like there's also the issue of for of not being transpiled.

I've got it to generate a @orbit/jsonapi (what seems like valid) es5 version by adding:

    ['@babel/plugin-transform-for-of'],
    ['@babel/plugin-transform-regenerator'],