You are reading the documentation for Vue Storefront v2. See the latest docs.

Home > @vue-storefront/core > addBasePath

addBasePath() function

Adds prefix with base path configured in router.base to provided url

Signature:

declare function addBasePath(path: string): string;

Parameters

Parameter Type Description
path string url to which base path will be added

Returns:

string

Relative path prefixed with router.base or not modified absolute path (it needs start from http or https)