Closed Dan503 closed 7 years ago
This is not the case.
That's odd then. It wouldn't work for me until "syntax-async-functions" was installed :/
I'm on "~6.4.0" of "babel-core".
Hmm, I'd expect it to work even on a way old version like that. That is exceptionally old though, so definitely upgrade as a first step.
Ok you're right. I just needed to update Babel to the latest version. It doesn't require the "syntax-async-functions" plugin any more :)
Babel doesn't natively support async-await syntax and it produces an error if you try to use async-await syntax in your source files without the syntax-async-functions babel plugin.
So basically instead of having this in your documentation:
.babelrc
It should say this:
.babelrc
Of course, the change would also be applied it to the "Via CLI", and "Via Node API" code examples as well.
Also, so that people don't have to download both plugins separately, "babel-plugin-syntax-async-functions" should be added to the dependencies list in the package.json file.