Closed tyrak closed 6 years ago
This works for me (check the link below).
If I had to guess the issue, I'd suggest your config for fast-async is missing/incorrect, and so it's falling back to the default, which is to use LazyThenables.
I suspect that this is not the case. If I change the last line to dummy().then();
to force dummy
to be included, I get the following:
function dummy() {
return new Promise(function ($return, $error) {
console.log("test");
return $return();
}.bind(this));
}
which doesn't look like as being lazy. Also, when I change the spec
flag to false
, I get different output, which makes me believe that fast-async
does correctly find the configuration.
Finally, everything does seem to works correctly when I use nodent
directly, the problem seems to be with babel
+fast-async
specifically.
Can you provide a .zip or .git repo with your base test case in? I'll see if I can spot what's going on.
NP. I'm glad you got it working
I was experimenting with
fast-async
andbabel
and I got the following unexpected behavior: Suppose that you have the following input file:If I transpile it with
babel
, the output is empty. When I change the last line tothen everything works as expected.
I have configured
babel
withplugins: ["fast-async", {spec: true}]
without any preset.