Eliminate dead code
$ npm install babel-plugin-dead-code-elimination
.babelrc
{
"plugins": ["dead-code-elimination"]
}
$ babel --plugins dead-code-elimination script.js
require("babel-core").transform("code", {
plugins: ["dead-code-elimination"]
});