The UI5 Builder module takes care of building your project.
Based on a project's type, the UI5 Builder defines a series of build steps to execute; these are also called "tasks".
For every type there is a set of default tasks. You can disable single tasks using the
--exclude-task CLI parameter, and you can include tasks using the
Tasks are specific build steps to be executed during build phase.
They are responsible for collecting resources which can be modified by a processor. A task configures one or more processors and supplies them with the collected resources. After the respective processor processed the resources, the task is able to continue with its workflow.
A project can add custom tasks to the build by using the Custom Tasks Extensibility.
All available standard tasks are documented in the API reference. Search for
@ui5/builder/tasks/ to filter the API reference for all available tasks. The list below offers the actual order of their execution:
Disabled tasks can be activated by certain build modes, the project configuration, or by using the
--include-task CLI parameter. See footnotes where given
1 Enabled in
jsdoc build, which disables most of the other tasks
2 Enabled for projects defining a component preload configuration
3 Enabled in
self-contained build, which disables
4 Enabled for projects defining a bundle configuration
5 Can be enabled for framework projects via the
includeTask option. For other projects, this task is skipped
Module.js, its content will be minified and a new resource
Module-dbg.js is created and placed next to it.
The UI5 runtime can be instructed to load those debug variants instead of compressed resources and bundles. This can ease debugging in some cases, since the original sources are then used directly in the browser. For details, refer to the UI5 framework documentation on debugging.
For each resource it compresses, the
Related to this, the bundling tasks will also incorporate the generated source maps to map the content of the bundles to the individual debug variants of the bundled modules.
Input Source Maps¶
Support for input source maps has been added in UI5 CLI
If a resource has been modified by another build task before
minify is executed, any referenced source map will be ignored. This is to ensure the integrity of the source maps in the build result.
It is possible that the modification of the resource content is not reflected in the associated source map, rendering it corrupted. A corrupt source map can make it impossible to properly analyze and debug a resource in the browser development tools.
Standard tasks which may modify resources without updating the associated source maps currently include
Expand the block below to view a diagram illustrating the minification process and source map handling.
Minification Activity Diagram
Processors work with provided resources. They contain the actual build step logic to apply specific modifications to supplied resources, or to make use of the resources' content to create new resources out of that.
Processors can be implemented generically. The string replacer is an example for that. Since string replacement is a common build step, it can be useful in different contexts, e.g. code, version, date, and copyright replacement. A concrete replacement operation could be achieved by passing a custom configuration to the processor. This way, multiple tasks can make use of the same processor to achieve their build step.
To get a list of all available processors, please visit the API reference and search for
Legacy Bundle Tooling (lbt)¶