Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library Including Components #70

Closed
1 of 6 tasks
BUPA opened this issue Oct 29, 2018 · 7 comments
Closed
1 of 6 tasks

Library Including Components #70

BUPA opened this issue Oct 29, 2018 · 7 comments
Labels
documentation Related to documentation or other non-code content information required Further information is required

Comments

@BUPA
Copy link

BUPA commented Oct 29, 2018

Expected Behavior

When building a library containing components there should be component-preloads for each component included in the library-preload.

Current Behavior

When building the library a library-preload is generated including the content of the included components.
When interpreting the library-preload n Error occures (See log section).

Subsequent to this error at runtime of the consuming application the framework tries to get the component's-preload. As this fails the framework is requesting the single source files (as it would be without a build).

Steps to reproduce the issue

  1. Build a library with webIDE Template including Components for reuse
    Good description at Nabi's blog:
    https://www.nabisoft.com/tutorials/sapui5/implementing-re-use-components-in-sapui5-libraries-and-consuming-them-in-sapui5-apps
  2. Build it
  3. Consume it (also described step by step in the blog)

At the moment I only have a example for this in our company namespace which I am not allowed to share. In case this would be necessary I could build a example on github for this.

Context

  • OS/Platform: SAP Web IDE Full-Stack - Version: 181025
  • Node.js Version: {...}
  • npm Version: {...}
  • Browser (if relevant): {...}
  • Other information: Tested on SAPUI5 1.52.16 on a SAP Netweaver 7.50 with SAP_UI 7.52

Affected components

Stack trace/log output

When starting consuming application I encounter a error with the generated library preload:

"Uncaught TypeError: sap.ui.require.preload is not a function
    at library-preload.js:1"

Find the generated Library-Preload here:

[library_preload.txt](https://github.com/SAP/ui5-tooling/files/2525282/library_preload.txt)

Consuming Application requests component-preload for Compnent WorkcenterInput from:

/sap/bc/ui5_ui5/<customernamespace>/<libraryname>/<cachebustertoken>/components/WorkcenterInput/Component-preload.js

@bendkt : Marker for you as we discussed this topic at TechEd. In case of analysis by official SAP I could provide our applications directly. If necessary I can create a public version.

@RandomByte RandomByte added the documentation Related to documentation or other non-code content label Feb 26, 2019
@RandomByte RandomByte self-assigned this Feb 26, 2019
@RandomByte
Copy link
Member

Hi @BUPA, please have a look into this documentation: https://ui5.sap.com/#/topic/8521ad1955f340f9a6207d615c88d7fd (chapter "Dependencies to Components" - Scenario 1: UI library contains multiple components)

You should first require the library before requiring any of its components.

@BUPA
Copy link
Author

BUPA commented May 6, 2019

Hey @RandomByte,

thx for your feedback. I already did this - I assume it would work if the generated library-preload wouldn't contain errors.

BR,
Paul

@ddsultan
Copy link

Is this still open?

@codeworrior
Copy link
Member

@BUPA: You're using a preload file created with Evo-tooling and using Evo-APIs on a pre-Evo UI5 version (1.52). That's not supported.

The ui5-tooling creates output only for newer runtime versions of UI5.

@BUPA
Copy link
Author

BUPA commented May 16, 2019

Tbh I did not care much about versions up to now. I created a Library from webIDE Library template (for 1.52) and built a freestyle app on 1.52 consuming it.

@RandomByte
Copy link
Member

@BUPA could you please confirm that this issue does not occur with current versions of UI5? As stated by @codeworrior this should not be an issue anymore.

@RandomByte RandomByte added the information required Further information is required label Dec 9, 2020
@RandomByte RandomByte removed their assignment Dec 9, 2020
@BUPA
Copy link
Author

BUPA commented Dec 10, 2020

@BUPA could you please confirm that this issue does not occur with current versions of UI5? As stated by @codeworrior this should not be an issue anymore.

Hey. I'm sorry - I missed on this one.
Just double checked it right now on 1.71.28 worked fine. COmponents are now part of the library-preload.

@BUPA BUPA closed this as completed Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Related to documentation or other non-code content information required Further information is required
Projects
None yet
Development

No branches or pull requests

4 participants