-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Defaulting to ts-node
is confusing when using ESM loaders
#2083
Defaulting to ts-node
is confusing when using ESM loaders
#2083
Comments
I'm not really familiar with TypeScript (mostly intentionally), but going by the steps you've included, it looks like a good work around would be to not use the Would that sound about right? |
Personally, I would drop I'd be happy to submit a PR for any of the above approaches |
I genuinely don't care about TS support, but it's been in nodemon for too long that removing it would probably break expectations. I think checking the |
Sounds good 👍 Where in the code do you think it would be best to add the check? In I'm thinking something like |
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
ping @remy, do you have any thoughts on my last question? |
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
friendly ping @remy |
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
friendly ping @remy |
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
friendly ping @remy |
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
friendly ping @remy Just need to know where you want the code and I'd be happy to send a PR 😅 |
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
friendly ping @remy Just need to know where you want the code and I'd be happy to send a PR 😅 |
Sorry, talk about having to prod me! You had the solution a good while ago, but it was quicker for me to make the PR! I'll get it merged today. |
nodemon -v
: 2.0.20NODE_OPTIONS='--loader @esbuild-kit/esm-loader' nodemon src/server.ts
Expected behaviour
I was expecting
@esbuild-kit/esm-loader
being used to load my TypeScript files, as that is the case when I runNODE_OPTIONS='--loader @esbuild-kit/esm-loader' node src/server.ts
(same command but withnode
instead ofnodemon
).Actual behaviour
It uses
ts-node
in order to transpile the TypeScript files.I only noticed this because source maps wasn't working properly, and upon investigating that I realised that
nodemon
had actually usedts-node
to transpile the typescript files.Steps to reproduce
package.json
filenpm install
index.ts
file:NODE_OPTIONS='--loader @esbuild-kit/esm-loader' node index.ts
NODE_OPTIONS='--loader @esbuild-kit/esm-loader' nodemon index.ts
The text was updated successfully, but these errors were encountered: