bun
bun copied to clipboard
Transpiler imports error
What version of Bun is running?
1.1.2
What platform is your computer?
Microsoft Windows NT 10.0.22631.0 x64
What steps can reproduce the bug?
transpile your ts code (that has import) with bun transpiler and .transformSync() , after that try to run your js traspiled code with node, it will give you Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension. error. after that make "type": "module" or make file from js to mjs. it still has problem. is there any way to replace imports to common js require with bun js?
What is the expected behavior?
No response
What do you see instead?
No response
Additional information
No response
Could you please share the code and commands you used?