When a ESM module cannot be loaded by require due to the presence of TLA, its module status would be stopped at kInstantiated. In this case, when it's imported again, we should allow it to be evaluated asynchronously, as it's also a common pattern for users to retry with dynamic import when require fails. PR-URL: https://github.com/nodejs/node/pull/55502 Fixes: https://github.com/nodejs/node/issues/55500 Refs: https://github.com/nodejs/node/issues/52697 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
2 lines
62 B
JavaScript
2 lines
62 B
JavaScript
let hello = await Promise.resolve('world');
|
|
export { hello };
|