-
-
Notifications
You must be signed in to change notification settings - Fork 7
Add ESM support #96
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
Add ESM support #96
Conversation
Thank you for addressing this! 🙌 |
lib/loader.ts
Outdated
export function TypeScriptLoader(options?: RegisterOptions): Loader { | ||
const tsNodeInstance = register({ | ||
...options, | ||
compilerOptions: { module: "commonjs" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI as of version 8.2.0
, Cosmiconfig no longer requires transpiled configuration to be CJS; they now accept pure ESM configuration files when using the asynchronous API.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah haven't had another chance yet to finish this off, this and the usage of require/import might need some changes during compilation to generate the appropriate sources
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@darkobits if you get a chance, this branch is now ready for testing :)
Closed in favour of #106 |
No description provided.