-
Notifications
You must be signed in to change notification settings - Fork 68
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
feat: support TS directory imports for ESM #422
Conversation
@@ -13,7 +13,7 @@ const getPackageType = require('get-package-type') | |||
* Defines file extension resolution when source files do not have an extension. | |||
*/ | |||
// eslint-disable-next-line camelcase | |||
const s_EXTENSIONS: string[] = ['.js', '.mjs', '.cjs'] | |||
const s_EXTENSIONS: string[] = ['.ts', '.js', '.mjs', '.cjs'] |
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.
Should .jsx
or .tsx
file extensions be included?
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.
@peternhale aren't .jsx
and .tsx
files specific to react development?
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.
Yes. Anything in oclif that prevents one from using react?
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.
@peternhale I just don't see the use case for using jsx syntax in a CLI. I'd rather not support it until someone comes along with a convincing use case
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.
I definitely want to play around with https://github.com/vadimdemedes/ink at some point. Might add it then 😄
Support ESM module resolution for typescript directories
Fixes #421