From 4870e093ac71ea70d3e9b8b4b2207f10f2d0fbae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=87=E7=BA=AF?= Date: Tue, 23 Mar 2021 14:35:38 +0800 Subject: [PATCH] =?UTF-8?q?fix(plugin-qiankun):=20=20=E5=A4=84=E7=90=86pub?= =?UTF-8?q?licPath?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/fes-plugin-qiankun/src/micro/index.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/fes-plugin-qiankun/src/micro/index.js b/packages/fes-plugin-qiankun/src/micro/index.js index e4915893..7deb76a6 100644 --- a/packages/fes-plugin-qiankun/src/micro/index.js +++ b/packages/fes-plugin-qiankun/src/micro/index.js @@ -34,11 +34,9 @@ export default function (api) { const { shouldNotModifyRuntimePublicPath } = qiankunConfig; if (runtimePublicPath === true && !shouldNotModifyRuntimePublicPath) { - // 这里必须使用__INJECTED_PUBLIC_PATH_BY_QIANKUN__,因为绝对地址只在开发时生效。 - // return `window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || "${api.config.publicPath || '/'}"`; - const port = api.getPort(); - - return `//localhost:${port}${api.config.publicPath || '/'}`; + return `window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || "${ + api.config.publicPath || '/' + }"`; } return publicPathStr;