mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-04-06 03:59:53 +08:00
fix(plugin-qiankun): 处理publicPath
This commit is contained in:
parent
e95361a572
commit
4870e093ac
@ -34,11 +34,9 @@ export default function (api) {
|
|||||||
const { shouldNotModifyRuntimePublicPath } = qiankunConfig;
|
const { shouldNotModifyRuntimePublicPath } = qiankunConfig;
|
||||||
|
|
||||||
if (runtimePublicPath === true && !shouldNotModifyRuntimePublicPath) {
|
if (runtimePublicPath === true && !shouldNotModifyRuntimePublicPath) {
|
||||||
// 这里必须使用__INJECTED_PUBLIC_PATH_BY_QIANKUN__,因为绝对地址只在开发时生效。
|
return `window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || "${
|
||||||
// return `window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || "${api.config.publicPath || '/'}"`;
|
api.config.publicPath || '/'
|
||||||
const port = api.getPort();
|
}"`;
|
||||||
|
|
||||||
return `//localhost:${port}${api.config.publicPath || '/'}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return publicPathStr;
|
return publicPathStr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user