Feature Request: Top level await
See original GitHub issue🙋 feature request
Parcel 2 could support Top Level Await. Most bundlers/runtimes are starting to support it so it could be nice to have it in Parcel
Webpack’s experiments.topLevelAwait
experimental feature
Node stable support ~Node’s(13.3+) --harmony-top-level-await
/--harmony_top_level_await
experimental feature~
Deno’s native support, https://github.com/denoland/deno/pull/3212
Chromium’s native support, https://bugs.chromium.org/p/v8/issues/detail?id=9344. Will ship in Chrome 89
Issue Analytics
- State:
- Created 4 years ago
- Reactions:18
- Comments:12 (8 by maintainers)
Top Results From Across the Web
Top-level await is available in Node.js modules - Stefan Judis
When dealing with asynchronous functionality such as making network requests, there was no top-level await support in Node.js (yet).
Read more >await - JavaScript - MDN Web Docs
The await operator is used to wait for a Promise and get its fulfillment value. It can only be used inside an async...
Read more >Top-level await - V8 JavaScript engine
Top -level await enables developers to use the await keyword outside of async functions. It acts like a big async function causing other ......
Read more >"top level await" | Can I use... Support tables for HTML5, CSS3 ...
JavaScript operator: await: Use at module top level. Usage % of ... Support data for this feature provided by: MDN browser-compat-data.
Read more >Top-level await in TypeScript 3.8
TypeScript 3.8 introduces a new functionality which is called top-level await. It allows developers to use the await keyword without a surrounding async ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Node now officially supports top level await https://github.com/nodejs/node/commit/54746bb763ebea0dc7e99d88ff4b379bcd680964 🎉
Related: https://twitter.com/bradleymeck/status/1506727720968986633 https://esm-exports-without-eval.glitch.me/
Details
the source code for c.mjs exports names: default, hi