Skip to content

Commit

Permalink
Temporary fix for import assertions/attributes collision
Browse files Browse the repository at this point in the history
  • Loading branch information
kilemensi committed Sep 4, 2024
1 parent 0bfa676 commit c250d5a
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/jest-config-commons-ui/next.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,18 @@ module.exports = {
"^.+\\.(js|jsx|ts|tsx)$": [
"babel-jest",
{
presets: ["next/babel"],
sourceType: "unambiguous",
targets: { node: process.versions.node },
// Can't use presets: ["next/babel"] here
// https://github.com/babel/babel/issues/16798#issuecomment-2326220768
// In short, next/babel is bundling old versions of babel that don't have the
// import assertions/attributes fix.
// 🤞🏽 this will be sorted in the next.js release
presets: [
"@babel/preset-env",
// or runtime: 'classic', depending on which one you are using
["@babel/preset-react", { development: true, runtime: "automatic" }],
],
plugins: ["@babel/plugin-transform-private-methods"],
},
],
Expand Down

0 comments on commit c250d5a

Please sign in to comment.