-
Notifications
You must be signed in to change notification settings - Fork 16
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
fix: should call config hook in idle callback #218
Conversation
Codecov ReportBase: 92.42% // Head: 92.42% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #218 +/- ##
=======================================
Coverage 92.42% 92.42%
=======================================
Files 55 55
Lines 1293 1294 +1
Branches 218 216 -2
=======================================
+ Hits 1195 1196 +1
Misses 98 98
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. |
CI 挂了,我看一下 |
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.
SGTM
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.
LGTM
Checklist
npm test
passesAffected core subsystem(s)
Description of change
config 的 lifecycle hook 是 loader 事件触发,当不存在 config 文件的时候不会触发 loader 的 before/after 事件,导致 config 的 lifecycle hook 也不会触发
所以在 loader 事件中加个 idle 事件,用于当某个 loader 没有被触发时回调,从而解决 config loader 没有使用时也能触发 configWillLoad 及 configDidLoad根据 DEFAULT_LOADER_LIST_WITH_ORDER 进行分组,分组后按顺序执行,保证内置的每个 loader 的 before/after 都会触发