Files
probody/src/shared/publicPath.js
T

9 lines
223 B
JavaScript

export function publicPath(relativePath) {
if (!relativePath) {
return relativePath
}
const path = relativePath.replace(/^\.\//, '').replace(/^\//, '')
return `${import.meta.env.BASE_URL}${path}`
}