Skip to content

Commit

Permalink
fix: 🐛 fix condition in necessaryLibChecker
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorPulzz committed Mar 26, 2024
1 parent 21ef1d8 commit da4a051
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/shared/utils/necessaryLibChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
);
Expand Down

0 comments on commit da4a051

Please sign in to comment.