artsy / palette

Artsy's design system
https://palette-storybook.artsy.net/
MIT License
214 stars 45 forks source link

fix: replaces lodash with es-toolkit #1395

Closed dzucconi closed 1 month ago

dzucconi commented 1 month ago

Re: DIA-790

lodash is currently 16% of palette's size.

es-toolkit is a replacement for lodash that is much smaller.

We shouldn't be importing all of lodash for a few utility functions.

We should attempt to do this in Force as well. Thoughts?

damassi commented 1 month ago

I dig it! Moving this into force feels worksome, but i'd be in favor, depending on the output of yarn why lodash -- it might be a case where 3rd party libs bring it in as a transitive dep and it can't be avoided.

damassi commented 1 month ago

@dzucconi - before merge, can you update the eslint restricted imports rule to guard against lodash imports? (Might not be necessary tho due to throwing type error)

artsyit commented 1 month ago

:rocket: PR was released in @artsy/palette-charts@37.13.3, @artsy/palette@38.13.3 :rocket: