Skip to Content
Aug 11, 2021 at 08:08 AM

Link theming service to Run Configuration

966 Views Last edit Oct 26, 2021 at 05:38 PM 2 rev

I have created an SAPUI5 application with standalone approuter in BAS (Business Application Studio) on a Cloud Foundry environment.

I want to link the Run Configuration to the theming service I've created in order to launch the app locally with a custom theme.

Steps I've taken:

  • I've created a theming service via mta.yaml
  • I've created a custom theme with the Theme Designer and I've published it
  • I've modified the index.html in order to use the custom theme (data-sap-ui-theme, data-sap-ui-theme-roots, data-sap-ui-versionedLibCss)
  • I've added a route to the xs-app.json of my SAPUI5 application in order to link the theme path to the theming service
            "source": "^/comsapuitheming.runtime/(.*)$",
            "target": "$1",
            "service": "",
            "endpoint": "runtime",
            "authenticationType": "xsuaa",
            "csrfProtection": false,
            "scope": [

The Run Configuration launches the following script

fiori run --open 'index.html?sap-client=100'

but when the application is launched all the theming resources are not loaded by chrome.

Can someone help me?