Scroll to navigation

UGLIFY-JS(1) User Commands UGLIFY-JS(1)

NAME

uglify-js - JavaScript parser, mangler/compressor and beautifier toolkit

SYNOPSIS

uglifyjs [files...] [options]

OPTIONS

Print usage information. `--help options` for details on available options.
Print version number.
Specify parser options.
Enable compressor/specify compressor options.
Mangle names/specify mangler options.
Mangle properties/specify mangler options.
Beautify output/specify output options.
Output options (beautify disabled).
Output file (default STDOUT).
Process and preserve comment annotations.
Ignore and discard comment annotations.
Preserve copyright comments in the output.
Read minify() options from JSON file.
Global definitions.
Embed everything in a big function, with configurable argument(s) & value(s).
Parse a single expression, rather than a program.
Support non-standard Internet Explorer.
Do not mangle/drop function arguments.
Do not mangle/drop function names. Useful for code relying on Function.prototype.name.
Process input as ES module (implies --toplevel)
File to hold mangled name mappings.
Force symbol expansion.
Disable symbol expansion.
Build UglifyJS as a library (implies --wrap UglifyJS)
Enable source map/specify source map options.
Display operations run time on STDERR.
Compress and/or mangle variables in toplevel scope.
Support non-standard Chrome & Node.js.
Perform validation during AST manipulations.
Print diagnostic messages.
Print warning messages.
Support non-standard Safari/Webkit.
Embed everything as a function with ???exports??? corresponding to ???name??? globally.

(internal debug use only)

Warning: replaces original source files with minified output.
Reduce a standalone test case (assumes cloned repository).
December 2022 uglify-js 3.17.4