diff --git a/packages/craco/lib/features/jest/create-jest-babel-transform.js b/packages/craco/lib/features/jest/create-jest-babel-transform.js index f4742b93..f732f438 100644 --- a/packages/craco/lib/features/jest/create-jest-babel-transform.js +++ b/packages/craco/lib/features/jest/create-jest-babel-transform.js @@ -53,7 +53,7 @@ function createJestBabelTransform(cracoConfig) { } } } - return babelJest.createTransformer(craBabelTransformer); + return babelJest.default.createTransformer(craBabelTransformer); } module.exports = { diff --git a/packages/craco/lib/features/jest/jest-babel-transform.js b/packages/craco/lib/features/jest/jest-babel-transform.js index 13adf42e..7fbd9e92 100644 --- a/packages/craco/lib/features/jest/jest-babel-transform.js +++ b/packages/craco/lib/features/jest/jest-babel-transform.js @@ -9,7 +9,7 @@ module.exports = { ...createJestBabelTransform(), process(src, filename, config, transformOptions) { if (!jestBabelTransform) { - jestBabelTransform = createJestBabelTransform(config.globals._cracoConfig); + jestBabelTransform = createJestBabelTransform(config._cracoConfig); } return jestBabelTransform.process(src, filename, config, transformOptions);