Skip to content

Commit 19ca39f

Browse files
committed
fix jest babel resolution
1 parent dd9ea5b commit 19ca39f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

jest-transformer.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,11 @@ const babelJest = require(`babel-jest`)
22

33
module.exports = babelJest.default.createTransformer({
44
presets: [`babel-preset-gatsby-package`],
5+
babelrcRoots: [
6+
// Keep the root as a root
7+
`.`,
8+
9+
// Also consider monorepo packages "root" and load their .babelrc files.
10+
`./packages/*`,
11+
],
512
})
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
{
1+
console.log('hi there');
2+
module.exports = {
23
"presets": [["babel-preset-gatsby-package"]],
34
"plugins": ["babel-plugin-replace-ts-export-assignment"]
45
}

0 commit comments

Comments
 (0)