It looks like Webpack 2 will have support for tree-shaking:
https://github.com/webpack/webpack/pull/861#issuecomment-149...
There's also rollup.js (another module bundler) that supports tree-shaking: http://rollupjs.org/
Either way, it seems like the code needs to be using ES6 modules to make it all work.