babel-minify is an experimental project that attempts to use Babel's toolchain (for compilation) to do something in a similar vein, minification. It's currently in 0.x, so we don't recommend using it in production. Current tools don't support targeting the latest version of ECMAScript. (yet). BabelMinify can because it is just a set of Babel plugins, and Babel already understands new syntax with our parser Babylon. When it's possible to only target browsers that support newer ES features, code sizes can be smaller because you don't have to transpile and then minify. When testing, it's recommended to run minifiers for production so less code is sent to end-users vs. in development where it can be an issue for readability when debugging. Options specific to a certain environment are merged into and overwritten non-env specific options.
Features
- Babel Minify is best at targeting latest browsers
- Can be used with the usual Babel es2015 preset to transpile down the code first.
- Requires node >= 6
- Requires babel >= 6.20.0
- minify is still in beta
- Run minifiers for production so less code is sent to end-users