Use specific methods from lodash to reduce bundle size

This commit is contained in:
Eliot Berriot 2018-12-20 11:21:15 +01:00
parent 17d86a2832
commit b2acd1e8a8
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
25 changed files with 38 additions and 24 deletions

13
front/src/lodash.js Normal file
View file

@ -0,0 +1,13 @@
// cherry-pick specific lodash methods here to reduce bundle size
export default {
clone: require('lodash/clone'),
debounce: require('lodash/debounce'),
get: require('lodash/get'),
merge: require('lodash/merge'),
range: require('lodash/range'),
shuffle: require('lodash/shuffle'),
sortBy: require('lodash/sortBy'),
throttle: require('lodash/throttle'),
uniq: require('lodash/uniq'),
}