remix-seo icon indicating copy to clipboard operation
remix-seo copied to clipboard

Replace lodash dependency with lodash.isequal.

Open RossMcMillan92 opened this issue 2 years ago • 2 comments

Using the lodash dependency brings in the entire lodash library, which is an issue for some serverless environments like Cloudflare Pages/Workers which require a quick start up time. This commit replaces the lodash library with the isEqual function that is being used.

RossMcMillan92 avatar Dec 29 '22 22:12 RossMcMillan92

According to https://lodash.com/per-method-packages, the Lodash per-method packages are "discouraged and they will be removed in v5."

The following results in small code bundles provided that you are using tree shaking:

import isEqual from "lodash/isEqual"; 

lpsinger avatar Sep 04 '23 18:09 lpsinger

See #12.

lpsinger avatar Sep 18 '23 13:09 lpsinger

Note that this PR does not represent the current best practice for using lodash with bundlers. I suggest #12 instead.

lpsinger avatar Jan 30 '24 22:01 lpsinger