I'm trying to configure Babel for Node v6.9.2. I want to use async
/await
constructs.
Because I'm new to Babel and all Node infrastructure, I confused how to configure it properly:
What preset should I use? Node is already implemented most of the ES6 features. So I don't want Babel to transpile features already supported by Node 6.9.x (arrow functions, new import mechanism etc) for performance reasons.
What plugins should I include so I can use async/await? There I also confused, because after some researching I found several plugins:
syntax-async-functions
,transform-async-to-generator
and some more.
Example of .babelrc
will help.
Thanks
See Question&Answers more detail:os