-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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: global loading is obtained from appData #10638
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
0e93bc8
to
0dae0ba
Compare
Co-authored-by: chencheng (云谦) <sorrycc@gmail.com>
ca4596e
to
339a328
Compare
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## master #10638 +/- ##
==========================================
- Coverage 28.79% 28.79% -0.01%
==========================================
Files 455 455
Lines 13567 13577 +10
Branches 3182 3178 -4
==========================================
+ Hits 3907 3909 +2
- Misses 8981 8989 +8
Partials 679 679
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
@sorrycc 我刚刚和 @Wxh16144 聊了下,umi.tpl
里还是需要改成 import Loading from '{{loadingComponent}}';
的,只是不提供 specifier 的用法,不然插件还是不能定制 Loading 组件,现在 dumi 为了支持 .dumi/loading
做法比较黑:https://github.com/umijs/dumi/blob/50135656d13c4e529d27c5f3553fecccc1c3a136/src/features/derivative.ts#L210
改完模板相当于 Umi 层的默认值是 loadingComponent = null | '@/loading'
,但允许插件通过 appData 修改这个值,比如变成 dumi/dist/client/loading
This comment was marked as outdated.
This comment was marked as outdated.
rename 会有 Breaking Change,因为 loadingComponent 是运行时参数的一部分,可以被运行时插件修改 |
background: umijs/dumi#1463