npm i uglify-my-js@latest
Requires Node.js v10+ to run.
Output file is generated in the current directory. It will contain minified file and source-map.
> uglifymyjs —help
> uglifymyjs —version
See Sample.
The tool is built on top of uglifyjs-webpack-plugin
. Following is the fixed configuration currently it is using. Feel free add new issues if you want any customization.
{
cache: false,
parallel: true,
uglifyOptions: {
compress: {
drop_console: true,
warnings: false,
},
toplevel: true,
keep_classnames: undefined,
keep_fnames: false,
nameCache: null,
output: {
beautify: false,
comments: false,
},
compress: true,
ecma: 6,
mangle: true,
},
sourceMap: true,
}
This library is designed to support JS files - i you want to add a new language support, we'd love you to contribute them here.
Please see Coding Guidelines when writing your PRs.
File issues in the Issues tab in GitHub