Repository navigation
Use specific packages from lodash instead of whole library - #534
itsmichaeldiego wants to merge 11 commits into
Conversation
| @@ -1,8 +1,9 @@ | |||
| import fp from 'lodash/fp'; | |||
| import map from 'lodash.map'; | |||
| import reduce from 'lodash.reduce'; | |||
There was a problem hiding this comment.
Instead of importing functions map and reduce from lodash, we can simply call native map reduce functions. If you agree i can change in this PR
There was a problem hiding this comment.
@ZAKdev If you can make a separate PR doing that, I can handle the rest. This is my first option, but the second one would be using all our own utils instead. So for both options the change you're proposing would be great.
There was a problem hiding this comment.
@ZAKdev Either way I go, your change independently will decrease the size of the build.
There was a problem hiding this comment.
@itsmichaeldiego, Ok i will do it in separate PR, i will open a PR soon and let me know if i can help you more to decrease the size of build.
There was a problem hiding this comment.
@ZAKdev Thanks, it will be really helpful for you to change the reduce and map given that you can test the changes in the heatmap and see if it works, thanks for that! I will be waiting on this, do you think you can do it today?
b986f05 to
62c488e
Compare
|
I am going for #535 as for now. |
|
@itsmichaeldiego, i don't have access anymore to push my code. |
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This PR is just one proposal to use specific packages from lodash instead of importing the whole library.
I came across with the problem that we tried to remove lodash here: 670fadd#diff-b9cfc7f2cdf78a7f4b91a753d10865a2R72 but we actually moved to devDependencies.
But accidentally, because it was there, @ZAKdev used
fpfrom lodash, as it was still in the devdependencies, in #441.After that, I also used isEmpty from lodash in #533
This increased the build size to 797kb standard and 201kb minified.
This PR decreases it to 398kb and 93.1kb minified.
Output: Size decreased by more than 50%
Prev:
Now: