ui5-tooling icon indicating copy to clipboard operation
ui5-tooling copied to clipboard

Forcefully add some classes (like sap/ui/core/ComponentSupport) to a self-contained build

Open kristian opened this issue 7 years ago • 9 comments

Expected Behavior

Only the sap-ui-custom.js boostrap JavaScript should be loaded when a self-contained build is chosen. The boostrap should contain all classes needed to run the application.

Current Behavior

Some files are anyways loaded seperately, such as the sap/ui/core/ComponentSupport in case the data-sap-ui-oninit boostrap option is chosen to load a component.

Steps to reproduce the issue

  1. Change the index.html file of the samle application to load the ComponentContainer via the data-sap-ui-oninit="module:sap/ui/core/ComponentSupport" method
  2. Build & serve the sample app self-contained

Context

  • OS/Platform: Windows
  • Node.js Version: 10.11.0
  • npm Version: 6.4.1
  • Browser (if relevant): Chrome Dev.
  • Other information: Tested on 1.59.0

Affected components

kristian avatar Oct 15 '18 11:10 kristian

Until we have worked out a solution, a workaround would be to manually add the dependency e.g. the Component.js module:

sap.ui.define([
  "sap/ui/core/UIComponent",
  "sap/ui/core/ComponentSupport"
], function(UIComponent) {
  "use strict";
  return UIComponent.extend("sap.ui.demo.todo.Component", {
    metadata: {
      manifest: "json"
    }
  });
});

matz3 avatar Jan 04 '19 10:01 matz3

@matz3 , are there any news on the subject?

pubmikeb avatar Aug 26 '21 21:08 pubmikeb

@pubmikeb No, unfortunately not.

matz3 avatar Aug 27 '21 10:08 matz3