fix(嵌入式): 嵌入式二级路径问题

This commit is contained in:
dataeaseShu 2024-03-15 17:27:04 +08:00
parent b5a9a9779c
commit 04528acb14
2 changed files with 3 additions and 2 deletions

View File

@ -26,6 +26,6 @@ export default {
}
}
},
sourcemap: true
sourcemap: false
}
}

View File

@ -13,7 +13,8 @@ const formatterUrl = <T extends Node>(node: T, prefix: string) => {
}
if (url.includes(suffix) || url.includes('dataease-private')) {
const currentUrlprefix = new URL(url).origin
const { origin, pathname } = new URL(url)
const currentUrlprefix = `${origin}${pathname.slice(0, pathname.length - 1)}`
const newUrl = url.replace(currentUrlprefix, prefix)
if (node instanceof HTMLLinkElement) {
node.href = newUrl