@ui5/builder/processors/minifier

Methods

(static) default(parameters) → {Promise.<Array.<module:@ui5/builder/processors/minifier~MinifierResult>>}

Description:
  • Minifies the supplied resources.
Source:
Parameters:
Name Type Description
parameters object Parameters
Properties
Name Type Attributes Description
resources Array.<@ui5/fs/Resource> List of resources to be processed
taskUtil @ui5/builder/tasks/TaskUtil | object <optional>
TaskUtil instance. Required when using the useWorkers option
options object <optional>
Options
Properties
Name Type Attributes Default Description
addSourceMappingUrl boolean <optional>
true Whether to add a sourceMappingURL reference to the end of the minified resource
useWorkers boolean <optional>
false Whether to offload the minification task onto separate CPU threads. This often speeds up the build process
Returns:
Promise resolving with object of resource, dbgResource and sourceMap
Type
Promise.<Array.<module:@ui5/builder/processors/minifier~MinifierResult>>

Type Definitions

MinifierResult

Description:
  • Result set
Source:
Properties:
Name Type Description
resource @ui5/fs/Resource Minified resource
dbgResource @ui5/fs/Resource Debug (non-minified) variant
sourceMap @ui5/fs/Resource Source Map
Result set
Type:
  • object