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

Support nested .babelrc files in babel-jest #6617

Closed
lehni opened this issue Jul 4, 2018 · 3 comments
Closed

Support nested .babelrc files in babel-jest #6617

lehni opened this issue Jul 4, 2018 · 3 comments

Comments

@lehni
Copy link

lehni commented Jul 4, 2018

🚀 Feature Proposal

Add support for nested .babelrc files in sub-folders

Motivation

When working with monorepos, e.g. through Lerna, it is currently not possible to run Jest from the root level in an easy way if each package / project has different .babelrc files, as is often the case when working with backend and frontend code in one monorepo.

I have therefore written my own version of babel-jest called babel-jest-nested that support this feature. I'd like to suggest to include this in babel-jest by default:

https://github.com/lehni/babel-jest-nested

Example

See the example here:

https://github.com/lehni/babel-jest-nested#example-with-lerna

Pitch

I am not the only one struggling with this problem, but so far there was no easy solution, see here:

lerna/lerna#994 (comment)
https://stackoverflow.com/questions/50511308/jest-projects-configuration-does-not-read-babelrc-and-webpack-config-json-in/51174657#51174657

etc.

@lehni
Copy link
Author

lehni commented Jul 17, 2018

It sounds like this is related: #6053 (comment)

So maybe PR #6629 isn't the right fix, but then this also means that the orignal getBabelRC() is using the wrong .babelrc files for caching in such circumstances.

@lehni
Copy link
Author

lehni commented Jul 17, 2018

I can confirm that #6053 (comment) indeed solves my issues and removes the need for babel-jest-nested

@lehni lehni closed this as completed Jun 23, 2019
@github-actions
Copy link

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.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant