From ce2e850a10f749d6886962b26a09d31fadcdc716 Mon Sep 17 00:00:00 2001 From: Ori Date: Tue, 21 May 2024 17:57:27 +0300 Subject: [PATCH] small changes --- config/jest/babelTransform.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/jest/babelTransform.js b/config/jest/babelTransform.js index f79ca7c..eee547a 100644 --- a/config/jest/babelTransform.js +++ b/config/jest/babelTransform.js @@ -2,7 +2,7 @@ const babelJest = require("babel-jest").default; module.exports = { process(sourceText, sourcePath, options) { - const alias = options.config.moduleNameMapper; + const alias = options?.config?.moduleNameMapper; const babelTransformer = babelJest.createTransformer({ presets: [["@babel/preset-react"], ["@babel/preset-env"]], plugins: [["transform-barrels", { jestAlias: alias }]], diff --git a/package.json b/package.json index a795be3..445de4c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "babel-plugin-transform-barrels", "version": "1.0.13", - "description": "This Babel plugin transforms indirect imports through a barrel file (index.js) into direct imports.", + "description": "A Babel plugin that transforms indirect imports through a barrel file (index.js) into direct imports.", "homepage": "https://github.com/FogelAI/babel-plugin-transform-barrels", "main": "src/main.js", "keywords": [