-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Hey,
I am running into an issue when I write for...of loop with await. (example). I am transpiling to ES5 with babel and I believe I need nodent-runtime to have that code running.
When I add useRuntimeModule: true to babel config I get this error:
[dev:build] Error: This API has been removed. If you're looking for this functionality in Babel 7, you should import the '@babel/helper-module-imports' module and use the functions exposed from that module, such as 'addNamed' or 'addDefault'.
I've tried adding @babel/helper-module-imports but couldn't make it work, not sure exactly how should I use it ;(
Is there a way I can make it work with fast-async and babel 7?
Edit:
What I just found out is it runs those async functions in the loop but anything that's after the loop not invoked. :/
....
// everything runs before
for (const hook of this.hooks.before) {
await hook(); // this run
}
await asyncFunction(); // this doesn't run