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

Allow bypassing babel #17

Open
ds300 opened this issue Jun 29, 2017 · 6 comments
Open

Allow bypassing babel #17

ds300 opened this issue Jun 29, 2017 · 6 comments

Comments

@ds300
Copy link
Owner

ds300 commented Jun 29, 2017

It is possible to write TS code such that Babel is not required to post-process TS compilation results. It would be a nice perf win for people in those situations if they could somehow prevent babel from being used.

For this feature, it doesn't make sense to inspect configuration options in tsconfig because they are not concrete enough to reliably express user intentions regarding babel usage.

I'm thinking that the best thing to do in the long run would be to expose an api to allow users to wrap and configure the transformer. Then they could point the bundler to their own transformer implementation.

@ahanriat
Copy link

@ds300 What about Typescript transformer support in Babel 7?

@ds300
Copy link
Owner Author

ds300 commented Sep 23, 2017

Yes! Babel 7 can transpile TypeScript, which is amazing and makes this library obsolete. Couldn't be happier to have a thing I've built become useless :D

@Karsens
Copy link

Karsens commented Nov 2, 2017

Hey @ds300 do you recommend using this or babel 7 with typescript-plugin if I want to start with a new expo project right now? Also, do you know where I can find good documentation for babel 7 typescript & expo?

@ds300
Copy link
Owner Author

ds300 commented Nov 2, 2017

@Karsens I think you will save some time if you use this library still, however I know of one team who have tried out babel 7 successfully, with the caveat that babel can't have both the typescript and flow plugins at the same time, so you end up needing to strip all the flow types from node_modules in a separate step.

See here: artsy/emission#780

@strayer
Copy link

strayer commented Jun 18, 2018

Seems like the newest React Native RC does use Babel 7. https://github.com/facebook/react-native/releases/tag/v0.56.0-rc.2

Did anyone already try using TypeScript directly with that version?

@GeeWee
Copy link

GeeWee commented Jul 3, 2018

Babel has some limitations - in regards to e.g. things like const enums, as it only transpiles one file at a time. For many things, babel should work fine, but not for all.
(Though if this transformer uses transpileModule internally, I think it has the same limitations)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants