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

fix(nextjs): update @nx/next/babel preset to remove conflicting plugins when testing in Jest #27414

Merged
merged 1 commit into from
Aug 13, 2024

Conversation

jaysoo
Copy link
Member

@jaysoo jaysoo commented Aug 13, 2024

The next/babel and babel-jest-preset Babel presets bring in conflicting plugins. This will cause Jest tests to fail.

This PR updates our own @nx/next/babel preset to remove the conflicting plugin from next/babel. Import assertions are out of date anyway, and we should be using import attributes (which babel-jest-preset supports).

See: https://github.com/tc39/proposal-import-attributes

Current Behavior

Expected Behavior

Related Issue(s)

Fixes #

…ns when testing in Jest
@jaysoo jaysoo requested a review from a team as a code owner August 13, 2024 20:02
@jaysoo jaysoo requested a review from ndcunningham August 13, 2024 20:02
Copy link

vercel bot commented Aug 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Aug 13, 2024 8:02pm

@jaysoo jaysoo enabled auto-merge (squash) August 13, 2024 20:15
@jaysoo jaysoo merged commit 54f52bb into master Aug 13, 2024
6 checks passed
@jaysoo jaysoo deleted the fix/next-error branch August 13, 2024 20:23
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

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

Successfully merging this pull request may close these issues.

None yet

2 participants