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
constAsyncFunction=Object.getPrototypeOf(run).constructor;exportasyncfunctionrun(code: string){returnnewAsyncFunction(code)();}awaitrun(`const t = await import('./doesnt_matter.tsx')`);
If you attempt to run this, which is based on code used inside of mdx, it will error with SyntaxError: Unexpected keyword 'import'. Expected ';' after variable declaration.
What is the expected behavior?
The above code should work as it can run in node.
What do you see instead?
SyntaxError: Unexpected keyword 'import'. Expected ';' after variable declaration.
Additional information
No response
The text was updated successfully, but these errors were encountered:
What version of Bun is running?
1.2.5
What platform is your computer?
Darwin 23.4.0 arm64 arm
What steps can reproduce the bug?
If you attempt to run this, which is based on code used inside of mdx, it will error with
SyntaxError: Unexpected keyword 'import'. Expected ';' after variable declaration.
What is the expected behavior?
The above code should work as it can run in node.
What do you see instead?
SyntaxError: Unexpected keyword 'import'. Expected ';' after variable declaration.
Additional information
No response
The text was updated successfully, but these errors were encountered: