package
UglifyJS integration for Babel
npm install babel-plugin-uglifyGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Estimated unpacked size across 2 packages.
1.2 MB
Includes dependencies.
UglifyJS integration for Babel.
It will allow you to integrate UglifyJS minifier into Babel pipeline without a need for generating code from Babel and parsing back into UglifyJS just to minify it and generate back again.
You can find a bit more detailed article on this in my blog.
$ npm install babel-plugin-uglify --save-devNote that plugin should be always runned after any ES6 transformers (use :after suffix as shown below), as UglifyJS doesn't understand ES6 at all, and thus will just break if you have anything left untransformed.
.babelrc (Recommended).babelrc
{
"plugins": ["uglify:after"]
}$ babel --plugins uglify:after script.jsrequire('babel').transform('code', {
plugins: ['uglify:after']
});