From f5ebef1f755f16d2f40bc45dd305fe300a125bf9 Mon Sep 17 00:00:00 2001 From: LooSheng Date: Mon, 28 Mar 2022 11:18:43 +0800 Subject: [PATCH] fix: tags respect base path --- src/index.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index 78794fd..2c7c843 100644 --- a/src/index.ts +++ b/src/index.ts @@ -121,16 +121,18 @@ function vitePluginCesium( tag: 'link', attrs: { rel: 'stylesheet', - href: normalizePath( - path.join(CESIUM_BASE_URL, 'Widgets/widgets.css') - ) + href: + base + + normalizePath(path.join(CESIUM_BASE_URL, 'Widgets/widgets.css')) } } ]; if (isBuild && !rebuildCesium) { tags.push({ tag: 'script', - attrs: { src: normalizePath(path.join(base, 'cesium/Cesium.js')) } + attrs: { + src: base + normalizePath(path.join(CESIUM_BASE_URL, 'Cesium.js')) + } }); } return tags;