This commit is contained in:
xiongxiao
2026-03-21 20:37:02 +08:00
committed by cnb
commit ee4ad269fe
19 changed files with 560 additions and 0 deletions

13
src/modules/basename.ts Normal file
View File

@@ -0,0 +1,13 @@
// @ts-ignore
export const basename = BASE_NAME;
console.log(basename);
export const wrapBasename = (path: string) => {
const hasEnd = path.endsWith('/')
if (basename) {
return `${basename}${path}` + (hasEnd ? '' : '/');
} else {
return path;
}
}