-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Jest not reading .babelrc #8365
Comments
@inf3cti0n95
|
@JoshRosenstein Is jest not supposed to support |
After jest upgraded to babel 7, babel.config.js, has been the recommendation, I haven't tested the alternatives. |
@JoshRosenstein Ohh Okay! I didn't know that! Thanks a bunch! |
but why? |
Since babel itself recommends it: https://babeljs.io/docs/en/configuration#what-s-your-use-case
|
thanks for the link! |
@SimenB Shouldn't the |
add jest and babel-jest add *.config.js to .eslintignore change .babelrc to babel.config.js because babel.config.js has been the recommendation ref: jestjs/jest#8365 (comment)
@inf3cti0n95 This issue should be reopened. Statements by other commenters are
The difference between
Finally, as stated in the docs:
So I hold the view that if jest claims compatibility with babel, it should support all the config files referred to in babel official documentation. |
This makes sure we can also transform files from imported packages. The change from babelrc to babel.config.js is due to the following issue: jestjs/jest#8365 Currently, jest won't read babel's configuration correctly when it is set in a .babelrc file.
This makes sure we can also transform files from imported packages. The change from babelrc to babel.config.js is due to the following issue: jestjs/jest#8365 Currently, jest won't read babel's configuration correctly when it is set in a .babelrc file.
This makes sure we can also transform files from imported packages. The change from babelrc to babel.config.js is due to the following issue: jestjs/jest#8365 Currently, jest won't read babel's configuration correctly when it is set in a .babelrc file.
This makes sure we can also transform files from imported packages. The change from babelrc to babel.config.js is due to the following issue: jestjs/jest#8365 Currently, jest won't read babel's configuration correctly when it is set in a .babelrc file.
@jsamr So at that time, this wasnt a jest issue. If jest is still ignoring these file types, I'm not sure if this would need to be re-opened or a new issue should be created. |
This makes sure we can also transform files from imported packages. The change from babelrc to babel.config.js is due to the following issue: jestjs/jest#8365 Currently, jest won't read babel's configuration correctly when it is set in a .babelrc file.
This makes sure we can also transform files from imported packages. The change from babelrc to babel.config.js is due to the following issue: jestjs/jest#8365 Currently, jest won't read babel's configuration correctly when it is set in a .babelrc file.
This makes sure we can also transform files from imported packages. The change from babelrc to babel.config.js is due to the following issue: jestjs/jest#8365 Currently, jest won't read babel's configuration correctly when it is set in a .babelrc file.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
I am using jest with ts-jest for my react-native project and it seems to ignore
.babelrc
file that I have written. It works when I put ababel.config.js
file with same configuration..babelrc content
babel.config.json content
jest configuration in package.json
error thrown when using
.babelrc
Expected behavior
It should be working with both .babelrc and babel.config.js
Run
npx envinfo --preset jest
Paste the results here:
Note
Please do not say that use babel.config.js instead, as I am using storybook which explicitly requires me to have a
.babelrc
. More InfoThe text was updated successfully, but these errors were encountered: