我正在玩 UI5 缩小和丑化。据我所知,有两种常见的方法:
使用
gruntfile.cjs
的 Grunt 任务,基于 grunt-openui5
。
使用
ui5.yaml
的 UI5 工具,基于 @ui5/cli
。
我的
ui5.yaml
:
specVersion: "2.5"
type: application
metadata:
name: com.myapp
framework:
name: OpenUI5
version: 1.95.0
resources:
configuration:
paths:
webapp: src/webapp
builder:
cachebuster:
signatureType: hash
componentPreload:
namespaces:
- "com/myapp"
paths:
- "src/webapp"
要使用
@ui5/cli
运行缩小,我执行以下 NPM 脚本任务:"test": "ui5 build preload"
,结果,我得到一个全新的 dist
文件夹,其中包含缩小且易于调试的文件(例如 App.controller.js
和 ) App-dbg.controller.js
),此外,还会生成Component-preload.js
。
我的问题:
基于 Grunt 的方法是传统方法,而
@ui5/cli
是当今的标准方法吗?
是否可以获得带有
Component-preload.js
且没有 @ui5/cli
文件夹的 UI5 应用程序的缩小版本(只是 dist
)?
你能找到解决方案吗
是否可以使用 @ui5/cli 获得没有 dist 文件夹的 UI5 应用程序的缩小版本(只是 Component-preload.js)?