Skip to content

Conversation

374632897
Copy link

  • use ramda instead of lodash
  • move prop-types to peerDependencies

@374632897 374632897 changed the title Make bundle smaller Make bundle size smaller Oct 27, 2017
@blord-fullscreen
Copy link

How does using ramda utilities make the bundle size smaller? Can you show a comparison table, compressed and uncompressed, etc?

@374632897
Copy link
Author

@blord-fullscreen Because lodash/find and lodash/sortby will use other methods of lodash, looks like you just use these two methods , but others will be referenced.

// lodash/find
var createFind = require('./_createFind'),
    findIndex = require('./findIndex');  

// lodash/_createFind
var baseIteratee = require('./_baseIteratee'),
    isArrayLike = require('./isArrayLike'),
    keys = require('./keys');
// ...

After we used ramda instead, the uncompressed bundle size reduced from 151kb to 46kb.

bundle size(uncompressed) finally size of find & sortBy percent
lodash 151.38kb 104.7kb 69.16%
ramda 46.42kb 7.96kb 17.14%

@clauderic
Copy link
Owner

Closing in favour of #374

@clauderic clauderic closed this May 17, 2018
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.

3 participants