node package manager

babel-preset-minify

babel-preset-minify

NPM version Build status Test coverage Dependency Status License Downloads

A babel preset with all the minification plugins I can find in the hopes that one day, we will have a minifier based on babel plugins instead of uglify-js.

Goals:

  • Faster minification since we don't have to re-parse the AST to minify
  • Better ES target control, meaning we could enable/disable specific ES features like arrow functions

Usage

npm i --save-dev babel-preset-minify
{
  "env": {
    "production": {
      "presets": [
        "minify"
      ]
    }
  }
}

Notes

The following are still not ported to babel 5:

  • minify-booleans
  • minify-boolean-cast
  • minify-number-cast