Skip to content

Commit

Permalink
✨ use window.publicPath for runtime public path
Browse files Browse the repository at this point in the history
  • Loading branch information
kuitos committed Mar 10, 2020
1 parent 6755be6 commit 091a9ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/slave/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function(api: IApi, options: Options) {
// 如果没有手动关闭 runtimePublicPath,则直接使用 qiankun 注入的 publicPath
if (api.config.runtimePublicPath !== false) {
api.modifyPublicPathStr(
`window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || "${
`window.publicPath || window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__ || "${
// 开发阶段 publicPath 配置无效,默认为 /
process.env.NODE_ENV !== 'development' ? api.config.publicPath || '/' : '/'
}"`,
Expand Down

0 comments on commit 091a9ee

Please sign in to comment.