Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

fix: lodash imports to use tree shaking to reduce bundle size #284

Merged
merged 1 commit into from
Sep 20, 2020

Conversation

ceremonious
Copy link
Contributor

I've been trying to reduce our bundle size and I saw that rich-markdown-editor is importing the entirety of lodash, which is a big library. These changes should help reduce the size.

@thenanyu
Copy link
Collaborator

thenanyu commented Sep 14, 2020

hey @ceremonious — I'm under the impression that the lodash maintainers recommend you do not do this, per https://lodash.com/per-method-packages

per method packages are being removed in v5

@tommoor
Copy link
Member

tommoor commented Sep 14, 2020

@thenanyu that article is referring to lodash.pick style, not lodash/pick which is okay.

I'm happy to merge this one, it hasn't been an issue in our main consuming repo because we use the babel plugin to make sure the minimum version of lodash is transpiled but I understand that not ever host app should have to do that.

@tommoor tommoor changed the title Fixed lodash imports to use tree shaking to reduce bundle size fix: lodash imports to use tree shaking to reduce bundle size Sep 20, 2020
@tommoor tommoor merged commit 99c7573 into outline:develop Sep 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants