Tree shaking is a form of dead code elimination in JavaScript, relies on es6 modules, and implemented in module bundlers.