-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
umi@4没有modifyClientRenderOpts了?用什么替代 #9761
Comments
由于缺乏足够的信息,我们暂时关闭了该 Issue。请修改(不要回复) Issue 提供最小重现以重新开启。谢谢。 |
是 |
|
之前在 |
// src/app.ts
export const modifyContextOpts = () => {
return {
// 能 overrides 的参数,可参考 .umi/umi.ts 传参
basename: '/cc',
rootElement: document.getElementById('#sub-root')
}
} |
不好意思,可能之前没有表达清楚
请问在umi@4下怎么解 |
// src/app.ts
export const rootContainer = (
rootContainer: React.ReactNode,
args: {
history: any
}
) => {
console.log('rootContainer: ', rootContainer)
console.log('args: ', args)
const history = args.history
const originPush = history.push
history.push = (path: any, state: any) => {
originPush(path, state)
}
return rootContainer
} 目前没有非常好的方案,可以提 feature 支持 |
继上面一条消息,新版本发布后( 将可以在 import { history } from 'umi'
export const render = (oldRender: any) => {
// use history
oldRender()
} |
部分 qiankun 应用有问题,改动被回滚了。 楼上的方案只能在 |
此方案不能满足,我们在重写 |
今天发版后可调用 |
What happens?
umi@3下会在运行时插件里使用
modifyClientRenderOpts
方法,umi@4下会报Error: register failed, invalid key modifyClientRenderOpts from
Mini Showcase Repository(REQUIRED)
How To Reproduce
Steps to reproduce the behavior:
api.addRuntimePlugin
添加 jsmodifyClientRenderOpts
报错Error: register failed, invalid key modifyClientRenderOpts from
Expected behavior
Context
The text was updated successfully, but these errors were encountered: