Tree-shaking is another name for dead (unused) code elimination and it's commonly done using UglifyJS. From my experience, using Babel and webpack breaks tree-shaking in some cases (e.g. using classes) and using Rollup can offer better results as it works on ES6 code.