Open matz3 opened 5 years ago
Background is a Cordova build I made using the basic template app as web content. These are the results of ui5 build self-contained --dest www --all --exclude-task=createDebugFiles
This is an overview by file type - you can see that 65% of the build is just JSON, CSS and .properties files.
Digging deeper it becomes apparent that most of this is related to localization, themes and RTL/LTR layouts.
The other thing is that many of the js files are redundant with the sap-ui-custom.js
built this way, and ideally those bundled files would be removed. Files not bundled this way are probably dead weight, too, if the intention is to bundle everything declared by the app.
@matz3 Hi Matthias, is it possible to specify excludedTasks: ["createDebugFiles"]
in ui5.yaml
file ?
This does not work:
specVersion: '1.0'
metadata:
name: ui5_compile
type: application
builder:
excludedTasks:
- createDebugFiles
@jrondorf my example was related to the API. When using the CLI this needs to be passed as option on the command line (--exclude-task=createDebugFiles
), e.g:
ui5 build self-contained --all --exclude-task=createDebugFiles
@matz3 Thanks, this works fine. Grüße, Jannis
Possible task for us: Document options to reduce size of build results
Hi @RandomByte,
was the Documentation improved already in this direction?
CU Gregor
Expected Behavior
When executing a build, a lot of files are written to the
dist
folder that might not be required at runtime, such as:This is relevant when packaging the app e.g. with Cordova, as the application bundle can become quite large. It also speeds up deployment e.g. when uploading the files to a server.
It would be helpful if a project could declare/define which locales/languages/themes should be supported. By default all variants should be used.
Current Behavior
It is currently only possible to exclude -dbg.js files
excludedTasks: ["createDebugFiles"]
--exclude-task=createDebugFiles
Context
ui5 --version
when using the CLI):0.2.6
Affected components (if known)