Skip to content

Conversation

RossMcMillan92
Copy link
Contributor

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.

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.
@lpsinger
Copy link
Contributor

lpsinger commented Sep 4, 2023

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 added a commit to lpsinger/remix-seo that referenced this pull request Sep 18, 2023
@lpsinger
Copy link
Contributor

See #12.

lpsinger added a commit to nasa-gcn/remix-seo that referenced this pull request Sep 18, 2023
@balavishnuvj balavishnuvj merged commit fe0bc53 into balavishnuvj:main Jan 30, 2024
lpsinger added a commit to lpsinger/remix-seo that referenced this pull request Jan 30, 2024
lpsinger added a commit to lpsinger/remix-seo that referenced this pull request Jan 30, 2024
@lpsinger
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants