bun icon indicating copy to clipboard operation
bun copied to clipboard

Transpiler imports error

Open FaryarKankash opened this issue 10 months ago • 1 comments

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

FaryarKankash avatar Apr 07 '24 10:04 FaryarKankash

Could you please share the code and commands you used?

Electroid avatar Apr 08 '24 20:04 Electroid