question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Library Including Components

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
BUPAcommented, 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.

0reactions
RandomBytecommented, Dec 9, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What Is A Component Library? - New Target, Inc.
A component library is a cloud-based folder with reusable components. It consists of all the styled and designed parts of a website or ......
Read more >
What is a Component Library? - UXPin
Component libraries offer the chance to standardize development, reduce code duplications, improve collaboration between teams, and drive ...
Read more >
What Is a Component Library - langvad.dev
A component library is a set of re-usable components. It could be a folder inside your project with common components used throughout the ......
Read more >
What is a Component Library? - JavaScript in Plain English
A component library is a set of reusable components you can use across your entire app. These component libraries consist of styled UI...
Read more >
What makes a great component library - Retool
Component libraries are collections of components unified with a common purpose. An example from the open-source world is MUI, which is a set...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found