Open kristian opened 5 years ago
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 , are there any news on the subject?
@pubmikeb No, unfortunately not.
What would be the status of this regarding TypeScript? Is this required to be imported if it's not explicitly used?
Yes, for TypeScript there shouldn't be any difference apart from how the module dependency is defined (sap.ui.define
vs import
).
Hi, @matz3 . Thank you for answering. These "community-driven" projects are sometimes complex, and makes it overwhelming. In the end I preferred to go via the Walkthrough Tutorial Typescript in the UI5 documentation which took me in a very simple project structure without multiple dev-dependencies.
I appreciate your time and your support.
Kind regards, Henrique
@henriquemattos I'm glad to hear that you found a solution, but I'm having trouble to understand the context. Can you help me understanding how a project structure without multiple dev-dependencies
relates to this issue about the sap/ui/core/ComponentSupport
module in bundles?
Hi, @matz3 . I'm sorry for the misleading comment. At the time I was working with ui5-tooling and ui5-easy-generator + generator-ui5-project, trying to bootstrap a TypeScript skeleton. I probably came across this ComponentSupport issue with one of the tutorials, and I commented on the wrong issue.
Should I delete my comment (if this is possible)?
Ah, I understand. I don't see a reason to delete the comment, but I could do so if you want to (and maybe you can even do it by yourself).
The TypeScript Walkthrough does not mention this workaround as it does not focus on a self-contained build.
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
Context
Affected components