Remove unused code
It's pretty common to get unreachable code warnings in our mochitests. We should remove these because dead code is extra kb and it fills up the logs.
Babel has a useful plugin, which we should be able to use.
https://babeljs.io/docs/plugins/minify-dead-code-elimination/
2252 INFO Console message: [JavaScript Warning: "unreachable code after return statement" {file: "resource://devtools/client/debugger/new/parser-worker.js" line: 22801}]
I started this branch to add uglify which looks like it should be perfect... but no luck
https://github.com/webpack-contrib/uglifyjs-webpack-plugin
https://github.com/jasonLaster/devtools-core/tree/uglify
@jasonLaster uglify has had its troubles with ES6/Babel code. Might be worth fiddling with babili? https://github.com/babel/babili
@wldcordeiro, I would vote for uglify for the reason that code minification probably should be a part of the webpack pipeline and not a part of just one of the tasks. It is more future proof if we would like to add or change something in the webpack pipeline (typescript, maybe).
@zaggy we've put a lot of work into using Flow so I'm doubtful of Typescript being included. 😉