-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
[Babel 8] fix ignoreExtensions
behaviour
#15562
[Babel 8] fix ignoreExtensions
behaviour
#15562
Conversation
"sourceType": "module", | ||
"presets": [ | ||
["@babel/preset-react"], | ||
["@babel/preset-typescript", { "allExtensions": true, "isTSX": true }] |
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.
The test case here is derived from babel-preset-taro
's usage: https://github.com/NervJS/taro/blob/2039dce209d12c7c05b3f4b07c70dd7e598fd02f/packages/babel-preset-taro/index.js#L78-L80
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/54267/ |
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.
Thanks for catching this! This is marked as [babel 8], but it also affects Babel 7, right? Because the disableExtensionsDetect
check is not gated behind the BABEL_8_BREAKING
flag.
The Babel 7 part works fine previously, |
ignoreExtension
behaviourignoreExtensions
behaviour
ignoreExtensions
option in Babel 8 does not work inpreset-typescript
.As a follow-up to #14955, this PR fixes a bug that
ignoreExtensions
is not respected in@babel/preset-typescript
. Gladly this bug has not yet been released so it hasn't affected anyone.Added
.vue
as an accepted test case extension, also improved thefindFile
performance.