menu
Menu
Mobify DevCenter
search_icon_focus

Utils

progressive-web-sdk/dist/ssr/universal/utils

getAssetUrl(path)

Get the URL that should be used to load an asset from the bundle.

Import
import { getAssetUrl } from 'progressive-web-sdk/dist/ssr/universal/utils

Returns:

string

ParameterTypeDescription
pathstringrelative path from the build directory to the asset

getProxyConfigs()

Return the set of proxies configured for the app.

The result is an array of objects, each of which has ‘protocol’ (either ‘http’ or ‘https’), ‘host’ (the hostname) and ‘path’ (the path element that follows “/mobify/proxy/”, defaulting to ‘base’ for the first proxy, and ‘base2’ for the next).

Import
import { getProxyConfigs } from 'progressive-web-sdk/dist/ssr/universal/utils

Returns:

Array.<ProxyConfig>


ProxyConfig

PropertyTypeDescription
.protocolStringhttp or https
.hostStringthe hostname
.pathStringthe path element that follows “mobify/proxy”