Uses the Terser JavaScript library to minify JavaScript code. Note that the
first time this function is called, it will load the terser library into the JavaScript context,
which may take a few seconds. Subsequent calls will be faster.
Usage
terser(input, options = NULL)
Value
A list containing the minified code and any warnings or errors.
Arguments
input
Either a path to a file or a character string containing the JavaScript code to be minified.
options
A list of options to pass to Terser for minification.
See the Terser documentation for available options.