self-contained build contains unused modules

未關閉
#527 2 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 2 天內回覆

還沒有人認領這個 Issue。

評估

難度
4/5
預估耗時
3-5 天
新手友好度
35/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
javascript

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

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
主要語言
JavaScript
星號
510
分支
80
平均合併
2 天 22 小時
30 天內合併 PR
12

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

UI5/cli 的其他 Issue

查看 UI5/cli 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。