From d09ce5750979867c754ef54495d60c877ea03c37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BF=9F=E4=BA=8C=E8=BF=9C?= Date: Wed, 8 Apr 2026 13:21:15 +0800 Subject: [PATCH] =?UTF-8?q?feat=20:=20=E8=B0=83=E6=95=B4=E9=80=82=E9=85=8D?= =?UTF-8?q?=E9=83=A8=E7=BD=B2=E9=98=BF=E9=87=8C=E4=BA=91=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/bootstrap.ts | 3 +-- web/src/vite-env.d.ts | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 web/src/vite-env.d.ts diff --git a/web/src/bootstrap.ts b/web/src/bootstrap.ts index b813de02..863fe1af 100644 --- a/web/src/bootstrap.ts +++ b/web/src/bootstrap.ts @@ -7,8 +7,7 @@ async function loadRuntimeConfig() { await new Promise((resolve, reject) => { const script = document.createElement('script') - const base = new URL('./', document.baseURI).pathname - script.src = `${base}runtime-config.js` + script.src = `${import.meta.env.BASE_URL}runtime-config.js` script.async = false script.onload = () => resolve() script.onerror = () => reject(new Error('Failed to load runtime config')) diff --git a/web/src/vite-env.d.ts b/web/src/vite-env.d.ts new file mode 100644 index 00000000..11f02fe2 --- /dev/null +++ b/web/src/vite-env.d.ts @@ -0,0 +1 @@ +///