[async-node]: support for require flag?
See original GitHub issueSo then we can just async-node -x .mjs,.js,.jsx -r @std/esm foo.mjs
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Top-level await is available in Node.js modules - Stefan Judis
Use the input-type flag to specify that the passed string value is an ECMAscript module.
Read more >Using async/await in node 7.4 - Stack Overflow
Yes async-await is supported in Node.js v7 but its locked behind the harmony flag. Features which are not yet production ready are behind ......
Read more >Async Await in Node.js - How to Master it? - Blog - RisingStack
Learn how to use async await in Node.js (async functions) to simplify your callback or Promise based application.
Read more >Command-line API | Node.js v19.3.0 Documentation
The program was started with a command-line flag that forces the entry point to be loaded ... (Requires Node.js to be built against...
Read more >Node 7.6 Brings Default Async/Await Support - InfoQ
Node.js 7.6 has shipped with official support for async/await enabled by default and better performance on low-memory devices.
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 FreeTop 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
Top GitHub Comments
@leebyron
The
@std/esm
loader now works with@babel/register
,nyc
, and other tools that transform source.Have you seen pirates? It’s what
@babel/register
uses to register its hooks. If you use that it would work seamlessly with things like@std/esm
esp if you allowed the-r
flagged code to run before your hook.I believe
@std/esm
attempts to transform sources live, so I would recommend first transforming your source files withasync-to-gen
to replace async/await statements, then used the output of that alongside@std/esm
. Otherwise, the intermediate state of a half-transformed file will not behave as expected.