Skip to content

Commit 7ba113e

Browse files
committed
Add babel plugin for import.meta
Jest needs to use babel to transform ESM to CJS
1 parent ccd64d9 commit 7ba113e

3 files changed

Lines changed: 23 additions & 4 deletions

File tree

babel.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ module.exports = function (api) {
1414
browserslistEnv: 'node'
1515
}
1616
]
17-
]
17+
],
18+
plugins: ['babel-plugin-transform-import-meta']
1819
}
1920
}

package-lock.json

Lines changed: 20 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
"@types/vinyl": "^2.0.12",
7373
"@typescript-eslint/eslint-plugin": "^8.39.0",
7474
"@typescript-eslint/parser": "^8.38.0",
75+
"babel-plugin-transform-import-meta": "^2.3.3",
7576
"concurrently": "^9.2.1",
7677
"cross-env": "^10.1.0",
7778
"del-cli": "^7.0.0",

0 commit comments

Comments
 (0)