mirror of
https://github.com/SomboChea/ui
synced 2024-06-19 01:39:43 +07:00
a89f363115
* feat: browser history is aware of basename * test: fix ui options global object * chore: fix comment
13 lines
358 B
JavaScript
13 lines
358 B
JavaScript
export function getRegistryURL() {
|
|
// Don't add slash if it's not a sub directory
|
|
return `${location.origin}${location.pathname === '/' ? '' : location.pathname}`;
|
|
}
|
|
|
|
export function getBaseNamePath() {
|
|
return window.__VERDACCIO_BASENAME_UI_OPTIONS.url_prefix;
|
|
}
|
|
|
|
export function getRootPath() {
|
|
return window.__VERDACCIO_BASENAME_UI_OPTIONS.base;
|
|
}
|