You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A project must define a specification version (`specVersion`), to which its configuration is compatible to. Also see [Specification Versions](#specification-versions).
31
31
32
-
In addition, a project must define a `type`. This can be either `application`, `library`, `theme-library` (since Specification Version 1.1), or `module`.
32
+
In addition, a project must define a `type`. This can be either `component`, `application`, `library`, `theme-library` (since Specification Version 1.1), or `module`.
33
33
34
34
The type defines the default path mappings and build tasks. See [UI5 Builder: Types](./Builder.md#types) for details.
35
35
36
36
:::code-group Example
37
37
38
+
```yaml [component]
39
+
specVersion: "5.0"
40
+
type: component
41
+
```
42
+
38
43
```yaml [application]
39
44
specVersion: "5.0"
40
45
type: application
@@ -125,7 +130,7 @@ resources:
125
130
webapp: webapp
126
131
```
127
132
128
-
#### Libraries
133
+
#### Libraries and Components
129
134
- `src`: Mapped to runtime path `/resources`
130
135
- `test`: Mapped to runtime path `/test-resources`
131
136
@@ -275,6 +280,21 @@ Projects that use the OpenUI5 framework cannot depend on projects that use the S
275
280
276
281
::: code-group Example
277
282
283
+
```yaml [component]
284
+
specVersion: "5.0"
285
+
type: component
286
+
metadata:
287
+
name: my.company.app
288
+
framework:
289
+
name: OpenUI5
290
+
version: 1.82.0
291
+
libraries:
292
+
- name: sap.ui.core
293
+
- name: sap.m
294
+
- name: sap.ui.table
295
+
- name: themelib_sap_fiori_3
296
+
```
297
+
278
298
```yaml [application]
279
299
specVersion: "5.0"
280
300
type: application
@@ -377,7 +397,7 @@ builder:
377
397
- "/resources/my/project/namespace/test/**"
378
398
```
379
399
380
-
```yaml [library or theme-library]
400
+
```yaml [component / library / theme-library]
381
401
builder:
382
402
resources:
383
403
excludes:
@@ -431,13 +451,13 @@ By default, the generated cachebuster info file signatures are based on timestam
431
451
432
452
### Component Preload Generation
433
453
434
-
For projects of type `application` a `Component-preload.js` bundle is generated by default. This bundle will contain most UI5 runtime-relevant resources of the component.
454
+
For projects of type `application` and `component` a `Component-preload.js` bundle is generated by default. This bundle will contain most UI5 runtime-relevant resources of the component.
435
455
You can override this default behavior by defining a `componentPreload` configuration.
436
456
437
457
For projects of type `library`, no Component Preload is created by default.
438
458
However you can define a `componentPreload` configuration to create Component Preload bundles. Those will be created in addition to the `library-preload.js` bundle.
439
459
440
-
There are two ways to define the set of components for which preload bundles should be generated. You can either provide `paths` (allowing patterns) or `namespaces`. You can also combine both configuration options. Defining any of them overrides the default preload bundle generation for the root component of `application` projects.
460
+
There are two ways to define the set of components for which preload bundles should be generated. You can either provide `paths` (allowing patterns) or `namespaces`. You can also combine both configuration options. Defining any of them overrides the default preload bundle generation for the root component of the project.
441
461
442
462
#### paths
443
463
@@ -600,7 +620,7 @@ This configuration can be overwritten more precisely with the CLI parameters `--
600
620
601
621
### Minification
602
622
603
-
For projects of types `application` and `library`, minification is done for all JavaScript files. During the minification step debug variants are created, original resources are minified, and source maps are created. You can exclude the resources of a project from minification using a list of glob patterns. Matching resources won't be minified, and no debug variants or source maps will be created.
623
+
For projects of types `application`, `component` and `library`, minification is done for all JavaScript files. During the minification step debug variants are created, original resources are minified, and source maps are created. You can exclude the resources of a project from minification using a list of glob patterns. Matching resources won't be minified, and no debug variants or source maps will be created.
604
624
605
625
The project's `ui5.yaml` file can contain a list of modules declared as glob patterns (resource name patterns) that are excluded from resource minification. Re-includes have to be marked with a leading exclamation mark `!`; see the example below. The order of filters is relevant; a later inclusion overrides an earlier exclusion, and vice versa.
0 commit comments