Code Monkey home page Code Monkey logo

Comments (6)

remy avatar remy commented on June 11, 2024 1

Sorry for the late reply. I've tried to compose multiple replies, and it keeps changing drastically as I start to fully understand the problem (aka: "fully read the ticket"!).

Would it make sense to add support for --import (in addition to --loader)? Is it as simple as that?

I'm really not sure what the broader impact is, but I'm guessing (because I've not used these myself) that import is ESM "require this module" and loader is commonjs "(actually) require this module".

My gut says that since adding the original loader support didn't mess up anyone's day, I'd guess adding import support would land in the same way.

Just let me know (hopefully with a considered response) and I'll get the change in and released πŸ‘

from nodemon.

remy avatar remy commented on June 11, 2024 1

That's live

from nodemon.

edosrecki avatar edosrecki commented on June 11, 2024

Same here, I want to use node --import tsimp/import, instead of node --loader ts-node/esm. Currently, I am using a mentioned workaround with execMap:

{
  "ext": "ts",
+  "execMap": {
+    "ts": "node"
+  },
  "env": {
    "NODE_OPTIONS": "--import tsimp/import"
  }
}

from nodemon.

edosrecki avatar edosrecki commented on June 11, 2024

@remy

I think that's correct, to support both flags.

Usage of --loader is discouraged (in fact it logs warnings in some Node.js versions), and it is recommended to use --import flag instead.

You can read more in official Node.js docs:

from nodemon.

remy avatar remy commented on June 11, 2024

I just pushed the code but for some reason it's not deploying, so I'll try to sort that out this evening.

from nodemon.

github-actions avatar github-actions commented on June 11, 2024

πŸŽ‰ This issue has been resolved in version 3.0.3 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

from nodemon.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.