porsager / flems

A single file web playground and sandbox
Do What The F*ck You Want To Public License
502 stars 87 forks source link

regeneratorRuntime is not defined (with Babel-transpiled code that uses generators) #84

Open pygy opened 4 years ago

pygy commented 4 years ago

linky

I don't know if Flems is supposed to work with IE11, but if it isn't you could just target ES6 with Babel...

porsager commented 4 years ago

I use Flems for IE11 tests sometimes, but not with Babel transpile enabled.

Would setting ES6 work for Babel fix this?

In that case It's probably a better tradeoff than not having generators work in modern browsers when Babel is active.

pygy commented 4 years ago

A third possibility would be to load said runtime, but I don't know how heavy it is, or if it can be done lazily.

I suppose that targeting ES6 would solve it, since it supports generators.