Skip to content
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

Replaced lodash.merge with merge-options #312

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

underoot
Copy link
Member

@underoot underoot commented Jan 16, 2024

Replaced lodash.merge with merge-options (based on two options recommended in deprecation notice of deep-assign library). Noticed, that lodash.merge added ~50KB of code, which significantly increase size of bundle without proper reason for that. Now situation with merge-options much better:

  • lodash.merge 50.1KB
  • merge-options 4.1 KB
  • deep-assign 1.3 KB

image
image
image

@underoot underoot requested a review from stepankuzmin January 16, 2024 13:05
@underoot underoot force-pushed the underoot-GLJS-remove-merge branch from 71c668e to ad832a3 Compare January 16, 2024 13:07
@stepankuzmin
Copy link
Contributor

Maybe we can even switch to Object.assign if we don't do a deep merge here, what do you think?

return merge({}, state, action.options);

@underoot
Copy link
Member Author

Maybe we can even switch to Object.assign if we don't do a deep merge here, what do you think?

I bet we do, i.e. for controls. We can brake backward compatibility, but I don't think that we should

@underoot underoot merged commit bd29cf7 into master Jan 16, 2024
7 checks passed
@underoot underoot deleted the underoot-GLJS-remove-merge branch January 16, 2024 13:16
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.

2 participants