From a1d7fb35d4a0f4806523555bd53536eded9101dc Mon Sep 17 00:00:00 2001 From: rhlin Date: Thu, 25 Apr 2024 10:34:31 -0700 Subject: [PATCH] =?UTF-8?q?fix(design-core/preview):=20=E4=BF=AE=E6=AD=A3c?= =?UTF-8?q?dn=E8=A7=A3=E8=80=A6preview=E8=8E=B7=E5=8F=96=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E7=9A=84importMap.json=E7=9A=84base=E8=B7=AF=E5=BE=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/design-core/src/preview/src/preview/http.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/design-core/src/preview/src/preview/http.js b/packages/design-core/src/preview/src/preview/http.js index 915fc69f4..4c09f3396 100644 --- a/packages/design-core/src/preview/src/preview/http.js +++ b/packages/design-core/src/preview/src/preview/http.js @@ -52,7 +52,6 @@ export const fetchMetaData = async ({ platform, app, type, id, history, tenant } : {} export const fetchImportMap = async () => { - return fetch(new URL('./preview-import-map-static/preview-importmap.json', location.href).href).then((res) => - res.json() - ) + const baseUrl = new URL(import.meta.env.BASE_URL, location.href) + return fetch(new URL('./preview-import-map-static/preview-importmap.json', baseUrl).href).then((res) => res.json()) }