-
Notifications
You must be signed in to change notification settings - Fork 2
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
question: non typescript support #20
Comments
Hi @prescottprue and thank you for reaching out! the |
I think the requested support means adding detection in convert.ts for {newExtension: '.js', suffix: '.js'},
{newExtension: '/index.js', suffix: '/index.js'}, and maybe {newExtension: '.js', suffix: '.jsx'}, I came across this in repo I am working with, but case was very narrow and I just fixed by hand. |
@prescottprue I just released v1.2.2 with the suggestions from @jason-ha. Can you please check if it fulfills your use-case? |
I also found a case where .cjs was referenced. So .cjs and .mjs should probably be checked as well. Propose #30 |
With the .cjs extension I'm looking good on the first project I tried, but I'll need to check the others. Thanks for the quick turnaround |
Cool, have you had the chance to check the others? |
Since there hasn't been any update, I am assuming that the testing went well. 🤞 |
Hey nice work! Had very similar thoughts about how this is needed. Wanted to ask if there is a plan support non TS files as well - feel free to close if out of scope (seems like it may be).
I ask because I created a jscodeshift transform to do this same thing for my projects (before I found ts2esm) which are mostly Typescript, but some are JS. Was thinking of just contributing here instead of maintaining a similar tool, but keeping JS support is unfortunately a must on my end.
If not no worries at all - In that case I'll keep a link to ts2esm in the transform docs so folks can be aware of their different options (we all just want to update to ESM at the end of the day 😆 )
The text was updated successfully, but these errors were encountered: