[ui5-task-pwa-enabler] Add option to configure path prefix for apps deployed on managed approver & enable option to support "crossorigin" for "<link>" #1017
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.
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 usingpreCache
globPattern expansion. Also provide an option to adduse-credentials
forcrossorigin
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 inpreCache
option for strategies:Advanced-Caching
&Cache-First
. Files won't be found and nothing will be added to list of cached files.