From 3dd4af924a16252fe0ee11d2918160947efa27ed Mon Sep 17 00:00:00 2001 From: ntishkevich Date: Fri, 18 Nov 2022 22:20:12 +0300 Subject: [PATCH] Replace a npm package `lodash` with its small analog `lodash.isequals` Replace a npm package `lodash`, from which a single function is used from whole lib, with its small analog `lodash.isequal` to reduce a bundle size. --- package.json | 2 +- src/Align.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 28f29a5..a0a3fa5 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@babel/runtime": "^7.10.1", "classnames": "2.x", "dom-align": "^1.7.0", - "lodash": "^4.17.21", + "lodash.isequal": "^4.5.0", "rc-util": "^5.3.0", "resize-observer-polyfill": "^1.5.1" }, diff --git a/src/Align.tsx b/src/Align.tsx index 234800f..3c7d7e3 100644 --- a/src/Align.tsx +++ b/src/Align.tsx @@ -8,7 +8,7 @@ import { composeRef } from 'rc-util/lib/ref'; import isVisible from 'rc-util/lib/Dom/isVisible'; import { alignElement, alignPoint } from 'dom-align'; import addEventListener from 'rc-util/lib/Dom/addEventListener'; -import isEqual from 'lodash/isEqual'; +import isEqual from 'lodash.isequal'; import { isSamePoint, restoreFocus, monitorResize } from './util'; import type { AlignType, AlignResult, TargetType, TargetPoint } from './interface';