I am trying to use ES2017 async/await syntax with Babel. In package.json, I have
package.json
\"babel\": { \"plugins\": [ \"babel-plugin-transform
Since functions defined such as
async function foo() { return 10; }
can be used before they're defined in javascript, Babel is moving it to the top of the file during transpilation.
To work around this, this try adjusting your syntax if possible:
const foo = async function() { return 10; }