fix(projects): fix app version notification plugin with sub deploy path

This commit is contained in:
1054959069@qq.com 2024-11-15 14:17:29 +08:00
parent 91de4a8ef7
commit 0d67a75444

View File

@ -64,7 +64,8 @@ export function setupAppVersionNotification() {
}
async function getHtmlBuildTime() {
const res = await fetch(`/index.html?time=${Date.now()}`);
const baseUrl = import.meta.env.VITE_BASE_URL === '/' ? '' : import.meta.env.VITE_BASE_URL
const res = await fetch(`${baseUrl}/index.html?time=${Date.now()}`);
const html = await res.text();