We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在写一个通用的响应拦截器插件,在登录失效情况下,原先是用 history.push 到本工程内的 '/login' 路由页面。现在需要新打开独立的登录页,在存在路由前缀(.umirc.ts 中配置 base)、微前端子应用等场景下,没有 basename,无法拼接完整的跳转链接
export { history }; 这里增加 basename 的导出。这样在自定义插件中即可通过 import { basename } from '@@/core/history' 获取 basename
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
需要配置文件配置的 base 值的话,比较好的方式是在配置文件里把这个值用 define 注入,之后项目里通过 process.env.XXX 使用。
base
define
process.env.XXX
Sorry, something went wrong.
子应用场景下呢?需要用 父应用 base + 子应用前缀,规则可能有很多,而从 history 里导出则比较直接。
No branches or pull requests
Background
在写一个通用的响应拦截器插件,在登录失效情况下,原先是用 history.push 到本工程内的 '/login' 路由页面。现在需要新打开独立的登录页,在存在路由前缀(.umirc.ts 中配置 base)、微前端子应用等场景下,没有 basename,无法拼接完整的跳转链接
Proposal
export { history }; 这里增加 basename 的导出。这样在自定义插件中即可通过 import { basename } from '@@/core/history' 获取 basename
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: