You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To avoid other engines or implementers to also break accidentally this feature, or even for Google Chrome to avoid breaking it again, it would be great to add tests for this in Test262 (as suggested here: https://x.com/robpalmer2/status/1836846820418601384).
// foo.jsexportfunctiondefine(foo){returnfoo.toUpperCase()}constgetter=()=>import('./bar.js')await1getter().then(r=>{// this will never be resolved}).catch(e=>{// this either})
Note that if remove the await 1, it will work again.
The text was updated successfully, but these errors were encountered:
Repo: https://github.com/tc39/proposal-top-level-await/
Spec text: https://tc39.github.io/proposal-top-level-await/
ECMA-262 PR: tc39/ecma262#2408
In the Google Chrome v129 release, the JavaScript module import is broken with circular + top-level-await (discovered by @antfu).
Related:
To avoid other engines or implementers to also break accidentally this feature, or even for Google Chrome to avoid breaking it again, it would be great to add tests for this in Test262 (as suggested here: https://x.com/robpalmer2/status/1836846820418601384).
Demonstration
Online demo
When the entry file is
foo.js
, with the following content:Note that if remove the
await 1
, it will work again.The text was updated successfully, but these errors were encountered: