-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lodash: Remove completely from @wordpress/format-library
package
#43738
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't test on mobile, but tested on desktop and reviewed the code. LGTM! 👍
Size Change: +2.5 kB (0%) Total Size: 1.25 MB
ℹ️ View Unchanged
|
Thanks, @aristath! I'll hold off merging until the React Native folks to confirm this isn't breaking anything on mobile. |
58fd841
to
6d7aafa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for notifying the mobile team. 🙇🏻
I tested these changes on an iPhone simulator and Android emulator. I encountered one crash that we should resolve before merging this work please.
Co-authored-by: David Calhoun <438664+dcalhoun@users.noreply.github.com>
Feedback has been addressed - could I get one last look, @dcalhoun? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀 Great work!
Thank you, @dcalhoun 🙌 |
What?
This PR removes all of the Lodash from the
@wordpress/format-library
package, including thelodash
dependency altogether. There are just a few usages and conversion is pretty straightforward.Why?
Lodash is known to unnecessarily inflate the bundle size of packages, and in most cases, it can be replaced with native language functionality. See these for more information and rationale:
@wordpress/api-fetch
package haslodash
as a dependency #39495How?
We're replacing a few usages with their native counterparts.
Testing Instructions