-
-
Notifications
You must be signed in to change notification settings - Fork 158
regeneratorRuntime issue #92
Comments
If you are using generators/async and the environment doesn't support it natively we compile using regenerator which uses a runtime. So you'll have to include regeneratorRuntime either yourself or use |
You have to require |
@hzoo thanks for the tips. I'm targeting So what I'm trying to obtain is to transpile in the right ENV and make the preset-env plugin include the right element. When I'm using
Unfortunately this does not help as I'd like to ship a single file. If it was in the case of an app why not, but this is not the case. Thanks ! |
Hmm ok - if you are making a library I wouldn't recommend a polyfill then because usually we make it up to the application to decide what polyfills to include not libraries. If you need to use those kinds of things you should check out transform-runtime instead. I haven't been able to modify that to also take in a "useBuiltIns" option yet though.
|
hmmm.. So I guess I had to wait for transform-runtime to be ready to use in combination with babel-preset. Thanks ! |
I have node 7.2.1 installed, and configure with
Yet, I am still getting this error. Is there some reason why it is using the polyfill? (Should I open a separate issue? I would think I've just got the wrong config somehow....). |
Yeah @shaunc because you are including es2015 in your preset still? preset-env covers everything so you can remove that. |
@hzoo ... you're absolutely right -- thanks! |
👍 Hopefully with this plugin ordering fix we should be able to error against that automatically in the future (seems to be a common mistake) |
Here is my
.babelrc
:All code
*entries() {
is tranformed toWhich throw a :
I then think about adding
babel-polyfill
orbabel-runtime
but then what would be the point of that preset 🤔So here I come, and how should we configure our .babelrc file for regenerators
thanks a lot !
The text was updated successfully, but these errors were encountered: