Home > @rushstack/webpack4-module-minifier-plugin
webpack4-module-minifier-plugin package
Classes
Class | Description |
---|---|
ModuleMinifierPlugin | Webpack plugin that minifies code on a per-module basis rather than per-asset. The actual minification is handled by the input minifier object. |
PortableMinifierModuleIdsPlugin | Plugin responsible for converting the Webpack module ids (of whatever variety) to stable ids before code is handed to the minifier, then back again. Uses the node module identity of the target module. Will emit an error if it encounters multiple versions of the same package in the same compilation. |
Functions
Function | Description |
---|---|
generateLicenseFileForAsset(compilation, asset, minifiedModules) | Generates a companion asset containing all extracted comments. If it is non-empty, returns a banner comment directing users to said companion asset. |
rehydrateAsset(asset, moduleMap, banner) | Rehydrates an asset with minified modules. |
Interfaces
Interface | Description |
---|---|
IAssetInfo | Information about a dehydrated webpack ECMAScript asset |
IDehydratedAssets | The set of data remaining to rehydrate in the current compilation |
IExtendedModule | Extension of the webpack Module typings with members that are used by this Plugin |
IModuleInfo | Information about a minified module |
IModuleMinifierPluginHooks | Hooks provided by the ModuleMinifierPlugin |
IModuleMinifierPluginOptions | Options to the ModuleMinifierPlugin constructor |
IPostProcessFragmentContext | Argument to the postProcessCodeFragment hook for the current execution context |
Variables
Variable | Description |
---|---|
CHUNK_MODULES_TOKEN | Token to replace the object or array of module definitions so that the minifier can operate on the Webpack runtime or chunk boilerplate in isolation |
MODULE_WRAPPER_PREFIX | Prefix to wrap function (module, webpack_exports, webpack_require) { ... } so that the minifier doesn't delete it. Public because alternate Minifier implementations may wish to know about it. |
MODULE_WRAPPER_SUFFIX | Suffix to wrap function (module, webpack_exports, webpack_require) { ... } so that the minifier doesn't delete it. Public because alternate Minifier implementations may wish to know about it. |
STAGE_AFTER | Stage # to use when this should be the last tap in the hook |
STAGE_BEFORE | Stage # to use when this should be the first tap in the hook |
Type Aliases
Type Alias | Description |
---|---|
IAssetMap | A map from file names to dehydrated assets |
IModuleMap | A map from module ids to minified modules |