-
Notifications
You must be signed in to change notification settings - Fork 202
Improve babel integration #523
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
Improve babel integration #523
Conversation
Marked as breaking change as it changes a key in |
I see that you tried to maintain backward compat. Thanks 🌹 |
I am okay with this. But since I don't use it personally, would like a review by @nycdotnet 🌹 |
Yes. The first thought was to write such type: externalTranspiler?: string | { name: string; options?: any }; It looks more self-describing, but leads to type guards or ugly type-casting inside |
That would be better please 🌹 don't want magic meanings :) |
Union type and type guard for externalTranspiler: https://github.com/s-panferov/atom-typescript/commit/87bc64f69616b2d33d06bee0a1fe2069a94d685e All three cases tested locally:
|
…tion Improve babel integration
Thanks |
Thanks. I know this was merged already, but I will take a look at this soon. I'm a bit busy at the moment due to the birth of my son. :-) |
Was pretty straight-forward. Nice job. |
Congratulations @nycdotnet!!!! Hope all is well |
Thanks. :-) Mom and baby are good. |
Excellent! Yourself? I'm guessing: tired (I was this time last year) |
@nycdotnet 👶 🌹 |
Hello. I am developing https://github.com/s-panferov/awesome-typescript-loader and I decided to implement a feature to pick-up precompiled files for
.ts
modules if any. I need this to speed-up TypeScript + Babel use-case, because this pair is really slow on a big codebases. Unfortunately,atom-typescript
externalTranspiler
functionality has several issues:.babelrc
file, becausefilename
property is not passed into babel options and babel doesn't know where to look for the.babelrc
file.I've fixed all the stuff in this PR. All useful changes are in the first commit. Please take a look.
Related issues:
#521 Implemented
#522 Hacked locally by adding
typescript.d.ts
intotsconfig.json
by hand, but I think that it is not a good solution, so I don't include compiled files into this PR.