ui5-community / ui5-ecosystem-showcase

A repository showcasing the UI5 tooling extensibility to combine OSS tools for UI5 application development.
https://ui5-community.github.io/ui5-ecosystem-showcase/
Other
189 stars 91 forks source link

[ui5-task-pwa-enabler] Add option to configure path prefix for apps deployed on managed approver & enable option to support "crossorigin" for "<link>" #1017

Closed preetamkajalrout closed 3 weeks ago

preetamkajalrout commented 3 weeks ago

Is your feature request related to a problem? Please describe. When application is deployed on a centralised runtime infrastructure like SAP Build Work Zone, application is served with a subpath before all the files. Making all the path of caching files not found at runtime, thereby no caching for the same. Also provide an option to add attribute crossorigin while appending <link> for manifest in index.html to support scenarios where manifest requires credentials.

Describe the solution you'd like ui5-task-pwa-enabler should provide an optional configuration option to provide a prefix that can be added after files have been identified at design time using preCache globPattern expansion. Also provide an option to add use-credentials for crossorigin attribute of <link>. So that, If the manifest requires credentials, user can configure this option at design time.

Describe alternatives you've considered Created a fork of ui5-task-pwa-enabler package and added as project dependency with changes to support both the feature.

Additional context URLs usually created by managed approuter deployment: https://<SubscriberSubdomain>.<LaunchpadHost>.<LaunchpadDomain>/<sapCloudService>.<appName>-<appVersion>/<resourcePath>

However, if the same pattern <sapCloudService>.<appName>-<appVersion>/**is provided in preCache option for strategies: Advanced-Caching & Cache-First. Files won't be found and nothing will be added to list of cached files.