Skip to content

@ui5/builder/tasks/minify ​

Methods ​

(static) default(options) → {module:@ui5/builder/tasks/runTask~TaskDescriptor}
​

Description: Task to minify resources.

A step-based task: the default export is a factory returning one map step with a key per matched resource, so a delta build re-minifies only the resources whose inputs changed. A resource's input source map (the //# sourceMappingURL= target) is read through the step's workspace and thus recorded as an input of that step, so changing only the .js.map re-runs its owning .js and regenerates a correct -dbg.js.map.

Source: builder/lib/tasks/minify.js, line 11

Parameters: ​
NameTypeDescription
optionsobjectOptions
Properties:
NameTypeAttributesDefaultDescription
patternstringPattern to locate the files to be processed
omitSourceMapResourcesbooleanoptionalfalseWhether source map resources shall
be tagged as "OmitFromBuildResult" and no sourceMappingURL shall be added to the minified resource
useInputSourceMapsbooleanoptionaltrueWhether to make use of any existing source
maps referenced in the resources to be minified. Use this option to preserve reference to the original
source files, such as TypeScript files, in the generated source map.
Returns: ​

The task descriptor with its build steps

Type: module:@ui5/builder/tasks/runTask~TaskDescriptor