Skip to content
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

Export ts-node/esm-register to use with --import #2072

Open
jlenon7 opened this issue Oct 4, 2023 · 1 comment
Open

Export ts-node/esm-register to use with --import #2072

jlenon7 opened this issue Oct 4, 2023 · 1 comment

Comments

@jlenon7
Copy link

jlenon7 commented Oct 4, 2023

Desired Behavior

Register the ts-node/esm loader using the register function. Example of use:

node --import=ts-node/esm-register

The content of the file would be something like this:

import { register } from 'node:module'
import { pathToFileURL } from 'node:url'

register('ts-node/esm', pathToFileURL('./'))

Is this request related to a problem?

No.

Alternatives you've considered

.

Additional context

.

@AaronNGray
Copy link

AaronNGray commented Jan 16, 2024

For further context and alternative example see :- #2100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants