-
-
Save mdarse/c27f5d52455938241cfc7ab7c0cec946 to your computer and use it in GitHub Desktop.
Broken module binding with top level await & dynamic import
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import B from "./b.js"; | |
console.log(B); // "undefined" or "X" depending on export in b.js |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let x; | |
// export default x; // broken | |
export { x as default }; // ok | |
x = await import("./c.js").then((mod) => mod.default); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default 'X'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment