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

Open
BUPA opened this issue Oct 29, 2018 · 5 comments
Open

Library Including Components #70

BUPA opened this issue Oct 29, 2018 · 5 comments

Comments

@BUPA
Copy link

@BUPA 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 this to Needs triage in UI5 Tooling - Bug Triage via automation Oct 29, 2018
@RandomByte RandomByte self-assigned this Feb 26, 2019
@RandomByte
Copy link
Member

@RandomByte RandomByte commented Apr 1, 2019

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 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

@ddsultan ddsultan commented May 16, 2019

Is this still open?

@codeworrior
Copy link
Member

@codeworrior codeworrior commented May 16, 2019

@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 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.