Skip to content

Commit

Permalink
fix(babel-jest): support esmodules
Browse files Browse the repository at this point in the history
see: ttps://github.com/jestjs/jest/issues/11444
  • Loading branch information
sanemat committed Jun 27, 2021
1 parent 0e79ff3 commit e40ab42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion jest-preprocess.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
const babelOptions = {
presets: ["babel-preset-gatsby", "@babel/preset-typescript"],
}
const babelJestMd = require('babel-jest');
const babelJest = babelJestMd.__esModule ? babelJestMd.default : babelJestMd;

module.exports = require("babel-jest").createTransformer(babelOptions)
module.exports = babelJest.createTransformer(babelOptions)

0 comments on commit e40ab42

Please sign in to comment.