Scroll to navigation

TERSER(1) User Commands TERSER(1)

NAME

terser - JavaScript parser and mangler/compressor and beautifier toolkit

SYNOPSIS

terser [options] [files...]

OPTIONS

output the version number
Specify parser options.
Enable compressor/specify compressor options.
Mangle names/specify mangler options.
Mangle properties/specify mangler options.
Format options.
Alias for --format.
Output file (default STDOUT).
Preserve copyright comments in the output.
Read minify() options from JSON file.
Global definitions.
Specify ECMAScript release: 5, 2015, 2016 or 2017...
Embed output in a big function with configurable arguments and values.
Support non-standard Internet Explorer 8.
Do not mangle/drop class names.
Do not mangle/drop function names. Useful for code relying on Function.prototype.name.
Input is an ES6 module
File to hold mangled name mappings.
Force symbol expansion.
Disable symbol expansion.
Support non-standard Safari 10.
Enable source map/specify source map options.
Display operations run time on STDERR.
Compress and/or mangle variables in toplevel scope.
Embed everything as a function with ???exports??? corresponding to ???name??? globally.
display help for command
July 2023 terser 5.19.2