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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Support Babel v8 #15152

Open
latin-1 opened this issue Jun 29, 2024 · 1 comment
Open

[Feature]: Support Babel v8 #15152

latin-1 opened this issue Jun 29, 2024 · 1 comment

Comments

@latin-1
Copy link
Contributor

latin-1 commented Jun 29, 2024

馃殌 Feature Proposal

Add support for Babel v8.
babel/babel#10746

Currently, using babel-jest and @babel/core@8 produces this error:

Requires Babel "^7.0.0-0", but was loaded with "8.0.0-alpha.11". If you are sure you have a compatible version of @babel/core, it is likely that something in your build process is loading the wrong version. Inspect the stack trace of this error to look for the first entry that doesn't mention "@babel/core" or "babel-core" to see what is calling Babel. (While processing: "/.../node_modules/@babel/plugin-syntax-object-rest-spread/lib/index.js")

Furthermore, we could add an option to babel-jest to opt-out the babel-preset-jest (especially, babel-preset-current-node-syntax, which does not make much sense if the developer specified their own babel config).

Motivation

.

Example

No response

Pitch

.

@SimenB
Copy link
Member

SimenB commented Jun 30, 2024

Supporting Babel 8 makes sense, happy to take a PR that expands our range (including tests).


Could you file a separate feature request for a way to opt out of the Jest preset? Note that this will break jest.mock hoisting etc.

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

2 participants