You can use Top-level await, it has been supported by nodejs 14.3.0 with --experimental-top-level-await flag, to avoid use IIAFEs. Read more about that: github.com/tc39/proposal-top-level... the limitations on IIAFEs section.
Top-level await
--experimental-top-level-await
limitations on IIAFEs
More: v8.dev/features/top-level-await bugs.chromium.org/p/v8/issues/deta...
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
You can use
Top-level await
, it has been supported by nodejs 14.3.0 with--experimental-top-level-await
flag, to avoid use IIAFEs.Read more about that: github.com/tc39/proposal-top-level... the
limitations on IIAFEs
section.More:
v8.dev/features/top-level-await
bugs.chromium.org/p/v8/issues/deta...