From da4a051c80de9a9b26ce1f4309c3d6990739c6af Mon Sep 17 00:00:00 2001 From: Victor Razdorov Date: Tue, 26 Mar 2024 15:38:02 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20fix=20condition=20in=20ne?= =?UTF-8?q?cessaryLibChecker?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/shared/utils/necessaryLibChecker.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/shared/utils/necessaryLibChecker.ts b/lib/shared/utils/necessaryLibChecker.ts index 938b62c..d678e8e 100644 --- a/lib/shared/utils/necessaryLibChecker.ts +++ b/lib/shared/utils/necessaryLibChecker.ts @@ -7,9 +7,9 @@ import { moduleExist } from "../moduleExist"; export function necessaryLibChecker(builder: BuilderEnum) { if ([BuilderEnum.CRA, BuilderEnum.NEXT].includes(builder)) { /** - * Check if developer using @svgr/webpack + * Check if developer using @svgr/webpack or babel-plugin-inline-react-svg */ - if (!moduleExist("@svgr/webpack") || !moduleExist("babel-plugin-inline-react-svg")) { + if (!moduleExist("@svgr/webpack") && !moduleExist("babel-plugin-inline-react-svg")) { throw new Error( "You need to install one of these libraries [@svgr/webpack | babel-plugin-inline-react-svg] to support svg as components", );