Rush StackShopBlogEvents
Skip to main content

Home > @rushstack/module-minifier

module-minifier package

This library wraps terser in convenient handles for parallelization. It powers @rushstack/webpack4-module-minifier-plugin and @rushstack/webpack5-module-minifier-plugin but has no coupling with webpack.

Classes

ClassDescription
LocalMinifierMinifier implementation that minifies code on the main thread.
MessagePortMinifierMinifier implementation that outsources requests to the other side of a MessagePort
NoopMinifierMinifier implementation that does not actually transform the code, for debugging.
WorkerPoolMinifierMinifier implementation that uses a thread pool for minification.

Functions

FunctionDescription
getIdentifier(ordinal)Gets a base54 string suitable for use as a JavaScript identifier, omitting those that are valid ECMAScript keywords

Interfaces

InterfaceDescription
ILocalMinifierOptionsOptions for configuring the LocalMinifier
IMinifierConnectionMetadata from the minifier for the plugin
IModuleMinificationCallbackCallback passed to a minifier function
IModuleMinificationErrorResultResult from the minifier function when an error is encountered.
IModuleMinificationRequestRequest to the minifier
IModuleMinificationSuccessResultResult from the minifier on a successful minification.
IModuleMinifierObject that can be invoked to minify code.
IModuleMinifierFunctionAn async function called to minify a chunk of code
IWorkerPoolMinifierOptionsOptions for configuring the WorkerPoolMinifier

Type Aliases

Type AliasDescription
IModuleMinificationResultResult from the minifier.