MatAtBread / fast-async

605 stars 21 forks source link

Does this work with babel-preset-es2017? #28

Closed nikolay closed 7 years ago

nikolay commented 7 years ago

https://github.com/babel/babel/tree/master/packages/babel-preset-es2017

matAtWork commented 7 years ago

It appears to (just tried from the cli) , although you probably want to remove the babel-plugin-transform-async-to-generator or make sure fast-async transforms before the default babel async transform.

matAtWork commented 7 years ago

...or alternatively don't use es2017 and just include babel-plugin-syntax-trailing-function-commas

nikolay commented 7 years ago

@matAtWork Well, remove all the nice defaults just to use one replacement - this doesn't sound like a sane strategy! Isn't there a way to monkey-patch babel-plugin-transform-async-to-generator somehow?

nikolay commented 7 years ago

Or why don't you suggest Babel to use your fast-async instead of babel-plugin-transform-async-to-generator?

MatAtBread commented 7 years ago

Feel free to suggest it to them. I'm sure @sebmck is happy with the current Babel solution tho. Babel's plugin architecture is very capable, and you easily create your own presets and publish them if you wish.

I'll close this issue as there's no solution I can provide in fast-async or nodent

nikolay commented 7 years ago

@MatAtBread There's this module I will to use and will publish here the solution with it if it work: https://www.npmjs.com/package/modify-babel-preset

matAtWork commented 7 years ago

Good luck :)