Are the '@babel/preset-typescript' options in the provided babel presets sensible? #246
Closed
jennysharps
started this conversation in
General
Replies: 2 comments 1 reply
-
I agree! This change was introduced here, many years ago. This would be a "breaking" change, so it's great for the upcoming v7! |
Beta Was this translation helpful? Give feedback.
1 reply
-
@jennysharps |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
At the moment, the typescript babel preset looks like this:
https://github.com/shakacode/shakapacker/blob/master/package/babel/preset.js#L33
According to this issue babel/babel#8924,
isTSX
&allExtensions
being set totrue
means the entire codebase is expected to be typescript. I'm trying to use the provided preset, but as my codebase is a combination ofjs
&ts
, I get errors.Would it not be more sensible of a default to pass in no options in the preset? Especially given the fact that one of the benefits of using typescript is the ability to introduce it incrementally to existing codebases.
Beta Was this translation helpful? Give feedback.
All reactions