Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] PR#11323 导致 basename 始终为 "" #11514

Open
fengsx opened this issue Aug 14, 2023 · 1 comment
Open

[Bug] PR#11323 导致 basename 始终为 "" #11514

fengsx opened this issue Aug 14, 2023 · 1 comment

Comments

@fengsx
Copy link
Contributor

fengsx commented Aug 14, 2023

What happens?

PR #11323 已经提及“仅在子应用有 basename 且挂载 /* 时会有 break,这个场景出现的概率非常低,且容易发现“
image

我们这边很多应用即是主应用,又是子应用,还设置了 basename,完全命中了这个已知问题。

具体表现为

// clientRenderOpts?.basename 为 ""
// basename 为 "/workbench"

// umi 4.0.72
// const newBasename = clientRenderOpts?.basename || basename;
// newBasename 为 "/workbench"
// umi 4.0.73
// const newBasename = clientRenderOpts?.basename ?? basename;
// newBasename 为 ""

即 newBasename 始终为 "",不能通过 config.base 配置。

@jaredleechn @kuitos 的 pr 可否规避掉这个问题?

Mini Showcase Repository(REQUIRED)

Please provide a minimal reproduction then upload to your GitHub. 请提供 最小重现,并上传到你的 GitHub 仓库

How To Reproduce

Steps to reproduce the behavior: 1. 2.

Expected behavior 1. 2.

Context

  • Umi Version: 4.0.73
  • Node Version: 14
  • Platform: Mac 13.4.1
@github-actions
Copy link

由于缺乏足够的信息,我们暂时关闭了该 Issue。请修改(不要回复) Issue 提供最小重现以重新开启。谢谢。

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 14, 2023
@github-actions github-actions bot reopened this Aug 14, 2023
fengsx added a commit to fengsx/umi that referenced this issue Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant