Open mavyfaby opened 1 week ago
@mavyfaby --bytecode forces to cjs which doesn't support top level await, you can check out a node thread on it https://github.com/nodejs/node/issues/21267 could change in the future but the difference in CJS vs ESM resolution cause the issue, you can always swap from top level await to a
new Promise((resolve, reject) => {
resolve(true);
});
What version of Bun is running?
1.1.31+e448c4cc3
What platform is your computer?
Linux 6.11.0-8-generic x86_64 x86_64
What steps can reproduce the bug?
Create a simple program that has top-level await:
run it with (the problem is
--bytecode
):What is the expected behavior?
Should've compiled without errors.
What do you see instead?
Additional information
No response