Open
Conversation
fnando
reviewed
Mar 6, 2026
Owner
|
I just released 4.5.4-alpha.0 with this change. I tested this on browser, browser with importmaps, react-native and react-native with expo. They all worked! I'm going to give it another try on the weekend, and make a release if everything goes well! |
|
@Bengejd would you consider using https://es-toolkit.dev/compatibility.html here? It's API-compatible with lodash/lodash-es, but much, much smaller. |
| @@ -1,4 +1,4 @@ | |||
| import camelCase from "lodash/camelCase"; | |||
| import camelCase from "lodash-es/camelCase"; | |||
There was a problem hiding this comment.
Would it be possible to avoid the subdirectory-style imports and move to import { functionname } from 'lodash-es'? Asking because it's an impediment to aliasing lodash-substitutes like es-toolkit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
PR Structure
PRs).
two PRs otherwise).
Thoroughness
fixes.
.mdfiles, etc… affected by this change.What
This PR migrates usage of
lodashto utilize thelodash-esbuild variant for better tree-shaking support.Why
lodash-esis the ESM build of lodash, which allows bundlers to tree-shake unused utility functions rather than including the entire library. Since this package targets modern bundler environments, usinglodash-esreduces the final bundle size for consumers. It also addresses issues brought to light in #111.Because
lodash-esships pure ESM, Jest cannot consume it directly in its default CommonJS environment. To support this, two changes were made to the dev/test setup:@babel/preset-envwas added and configured viababel.config.jsto transform ESM to CJS at test timetransformIgnorePatternsinjest.config.jswas updated to allowlodash-esto be transformed (Jest skipsnode_modulesby default)All tests are passing.
Known limitations
N/A