sapui5ui5-tooling

UI5 Tooling: Specifying libraries dependencies in ui5.yaml


Playing with UI5 Tooling, I see that the ui5.yaml config file contains a framework library section, where we supposed to specify UI5 app dependencies, e.g. sap.m, sap.ui.core etc.:

specVersion: "3.2"
type: application
metadata:
    name: com.myApp
framework:
    name: OpenUI5
    version: 1.124.0
    libraries:
        -   name: sap.m
        -   name: sap.ui.core

My questions:

  1. Should the framework/libraries section of ui5.yaml be identical to the sap.ui5/dependencies/libs one of manifest.json?

  2. If I understand it correctly, these framework/libraries section is used to incorporate these libs into Component-preload.js. Is it a correct assumption?

  3. Should I specify this libraries section at all in case, if I consume UI5 lib from the CDN?


Solution

  • I've got the answers to my questions on SAP UI5 Tooling Github:

    1. Should the framework/libraries section of ui5.yaml be identical to the sap.ui5/dependencies/libs one of manifest.json?

    Yes. framework/libraries defines how to build the app, while sap.ui5/dependencies/libs is used for the UI5 core bootstrapping — which libs to load and how to load them (prefetch or lazy).

    1. If I understand it correctly, these framework/libraries section is used to incorporate these libs into Component-preload.js. Is it a correct assumption?

    framework/libraries defines which libs should be bundled in case of self-contained builds only.

    1. Should I specify this libraries section at all in case, if I consume UI5 lib from the CDN?

    This might be useful for a local development.