UI5 / UI5/cli

self-contained build contains unused modules

Open
#527 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Expected Behavior

One reason why UI5 modules can be included in the self-contained bundle - even when not explicitly used within the project - is that these modules might be required as dependencies within the ui5 framework itself.

However generally, it is not expected that ui5 classes are part of the self-contained bundle when they are not required anywhere in the project.

Current Behavior

The self-contained bundle contains lots of classes / ui5 controls, even though they aren't included anywhere in the project.
For instance in case of the ui5-sample-app:

  • sap/m/Dialog.js
  • sap/m/Select.js
  • sap/m/Table.js

Steps to Reproduce the Issue

  1. git clone https://github.com/SAP/openui5-sample-app.git
  2. cd openui5-sample-app && npm run build-self-contained
  3. Analyze dist/resources/sap-ui-custom.js

Context

  • UI5 Module Version (output of ui5 --version when using the CLI): 2.11.2

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.

Research direction

Reproduce the issue with openui5-sample-app using npm run build-self-contained, then inspect dist/resources/sap-ui-custom.js and the self-contained bundling entry points. Determine why sap/m/Dialog.js, sap/m/Select.js, and sap/m/Table.js are included; done means unused UI5 classes are excluded while required framework dependencies remain.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.