webpack 2 introduces tree shaking which can remove unused code when ES2015 modules are used to import and export code.
npm install babel-preset-es2015-webpack --save-dev
in .babelrc:
{ "presets": [ "es2015-webpack" ] }