Dependency bundling ignores mvc factory functions

Open
#382 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript

Research direction

Start with the dependency handling in ui5-builder and the related usage in TechnicalInfo.js at the referenced line. Reproduce the issue with the openui5-sample-app using ui5 build self-contained --all, then inspect the bundle and network trace. Done means resources referenced through MVC factory APIs such as sap.ui.fragment are included instead of loaded individually.

Written by the indexing model from the issue text.

Description

module/ui5-builder

Expected Behavior

MVC factory APIs like sap.ui.fragment should be identified as dependency declarations.

Current Behavior

Resources referenced by MVC factories are not processed as bundle dependencies.

Steps to reproduce the issue

  1. Setup openui5-sample-app
  2. Add sap.ui.layout dependency for technical information dialog: npm install @openui5/sap.ui.layout
  3. Execute ui5 build self-contained --all
  4. Serve dist directory
  5. Open technical information dialog by pressing CTRL + SHIFT + ALT + P
  6. Observe in the network trace that single sap.ui.layout controls are being loaded.
    ➡️ This indicates that they are not part of the self contained bundle

Related code: https://github.com/SAP/openui5/blob/9974c1e7f9179397745d896df72cf2d1d773f325/src/sap.ui.core/src/sap/ui/core/support/techinfo/TechnicalInfo.js#L79

CC: @codeworrior

Also see https://github.com/SAP/ui5-tooling/issues/68

Affected components

Dominant language
JavaScript
Stars
511
Forks
83
Avg merge
1d 5h
Merged PRs (30d)
55

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from UI5/cli

All issues in UI5/cli

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.