change to next

This commit is contained in:
xiongxiao
2026-01-15 12:32:07 +08:00
parent 62b5c5841a
commit b2f315a459
122 changed files with 9396 additions and 9354 deletions

View File

@@ -1,13 +1,18 @@
// @ts-ignore
export const basename = BASE_NAME;
const isDev = process.env.NODE_ENV === "development";
const BASE_NAME = isDev ? '' : '/root/perler-beads';
console.log(basename);
export const basename = BASE_NAME;
export const wrapBasename = (path: string) => {
const hasEnd = path.endsWith('/')
let _basename = basename;
if (basename) {
return `${basename}${path}` + (hasEnd ? '' : '/');
_basename = `${basename}${path}`;
} else {
return path;
_basename = path;
}
if (isDev) {
return _basename
}
return _basename + '.html';
}