-
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
feat: runtime plugin support modifyClientRenderOpts #5096
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5096 +/- ##
=======================================
Coverage 82.84% 82.84%
=======================================
Files 153 153
Lines 3381 3381
Branches 906 908 +2
=======================================
Hits 2801 2801
+ Misses 573 572 -1
- Partials 7 8 +1
Continue to review full report at Codecov.
|
@@ -8,6 +8,21 @@ | |||
|
|||
## 配置项 | |||
|
|||
### modifyClientRenderOpts(fn) | |||
|
|||
修改 clientRender 参数。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文档里解释一下能做什么?感觉看不太懂。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我补一个,其实很少会用到,只在微前端里有。
export function modifyClientRenderOpts(memo) { | ||
return { | ||
...memo, | ||
mountElementId: isSubApp ? 'sub-root' : memo.mountElementId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
看下面的代码用法不是传递 mountElementId
而是传递 rootElement
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,rootElement。
Checklist
npm test
passesDescription of change
支持修改 clientRender 参数。
比如:
Close #5067
Ref #4979
Close #5020
View rendered docs/docs/runtime-config.md
View rendered docs/docs/runtime-config.zh-CN.md