It’s something you do when you want to harvest fruits or get something else out of the tree
Or it removes dead code from your bundled output. Like say you have a utils.js with multiple unrelated exported functions, but you only need to use one function. Your bundled output will only contain that one function rather than the entire file.
4
u/jamesaw22 Mar 19 '19
Destructure from 'loadsh-es' so you can tree shake!
import { values, clone } from 'lodash-es';