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

experimentalExtensionlessBinWorkaround option to resolve extensionless entrypoints to CJS in ESM loader #1611

Closed
cspotcode opened this issue Jan 25, 2022 · 1 comment
Labels
you can do this Good candidate for a pull request.

Comments

@cspotcode
Copy link
Collaborator

This is labelled to indicate we will accept a pull request that implements this feature.

Intentionally marked experimental so that ts-node can remove or change it at any time without following semver. Intentionally has verbose name to include the word "workaround."

When a user enables this and they use the ESM loader, it will resolve extensionless entrypoints to CJS format to workaround the errors caused by nodejs/node#33226

This is an intentional divergence from node's behavior. Users who enable this flag must understand that it may cause breakages in the future. However, in the present, it will unblock those users, allowing them to combine ts-node/esm with third-party tools that have extensionless bin entrypoints.

Can be named either experimentalExtensionlessBinWorkaround or experimentalExtensionlessEntrypointWorkaround

See also: discussion starting here
#1007 (comment)

@cspotcode
Copy link
Collaborator Author

Closing in favor of #1649

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
you can do this Good candidate for a pull request.
Projects
None yet
Development

No branches or pull requests

1 participant