This repository has been archived by the owner on Nov 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 147
top-level await not working #199
Labels
Comments
It looks like I'm only enabling top-level await for ESM. So if you're using the defaults you'd want to make that an index.mjs. I'll expand it to supporting both CJS and ESM though. |
@jdalton I had a suspicion, since the docs are mentioning
but I thought, if it's not meant to work in CJS, I would have suggested to change the wording to emphasize that the "await" flag only works in ES modules. Anyhow, I tried the above with ESM (default): index.mjs
esmrc:
cli:
... as well as: index.js
cli:
and both are still failing. :/ |
dnalborczyk
added a commit
to dnalborczyk/esm
that referenced
this issue
Dec 28, 2017
follow up from: standard-things#199 clarification for top-level _await_ support in ESM and CJS, also noting that Node v7.6+ is required.
This was referenced Dec 28, 2017
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
top-level await seems to be not working. not sure if that is a regression (never tried it, until now).
node 9.3.0, std/esm v0.18.0
repro steps:
esmrc:
index.js:
cli:
error:
The text was updated successfully, but these errors were encountered: