When using the Bun runtime environment as a substitute for Node.js, there is an unexpected requirement to include the ".js" file extension when running a JavaScript file. This contrasts with Node.js, where we can directly execute a JavaScript file without specifying the ".js" extension.
For example :
node app.js as well as node app works
but for bun,only bun app.js is the only way
What is the feature you are proposing to solve the problem?
The requirement to explicitly include the ".js" extension when executing JavaScript files in the "bun" runtime environment can be cumbersome and deviates from the user experience provided by Node.js. Users may expect similar behavior in both environments, making it difficult to transition between the two. It is suggested to consider adopting a similar behavior to Node.js for file execution, allowing users to run JavaScript files directly without the need for the ".js" extension in "bun". This change would improve developer experience.
I tried to set up Angular tests in JetBrains Rider using bun, but it seems impossible at the moment because bun requires file extension to be specified, which is under the Rider's control:
What is the problem this feature would solve?
When using the Bun runtime environment as a substitute for Node.js, there is an unexpected requirement to include the ".js" file extension when running a JavaScript file. This contrasts with Node.js, where we can directly execute a JavaScript file without specifying the ".js" extension.
For example :
node app.js
as well asnode app
works but for bun,onlybun app.js
is the only wayWhat is the feature you are proposing to solve the problem?
The requirement to explicitly include the ".js" extension when executing JavaScript files in the "bun" runtime environment can be cumbersome and deviates from the user experience provided by Node.js. Users may expect similar behavior in both environments, making it difficult to transition between the two. It is suggested to consider adopting a similar behavior to Node.js for file execution, allowing users to run JavaScript files directly without the need for the ".js" extension in "bun". This change would improve developer experience.
What alternatives have you considered?
No response