Skip to content

Commit a53eb10

Browse files
committed
feat(projects): app version notification plugin support sub deploy path. close #668
1 parent d088f81 commit a53eb10

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/plugins/app.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ export function setupAppVersionNotification() {
9292
}
9393

9494
async function getHtmlBuildTime() {
95-
const res = await fetch(`/index.html?time=${Date.now()}`);
95+
const baseUrl = import.meta.env.VITE_BASE_URL || '/';
96+
97+
const res = await fetch(`${baseUrl}index.html?time=${Date.now()}`);
9698

9799
const html = await res.text();
98100

0 commit comments

Comments
 (0)