2022-02-16 11:20:17 +08:00

6 lines
174 B
TypeScript

const publicPath = (document.currentScript as HTMLScriptElement)?.src.replace(/^(.*\/)[^/]+$/, '$1');
export function getPublicPath(): string {
return publicPath || '';
}