-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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(builder): extendPlugins
option and builder:extendPlugins'
hook
#6285
Conversation
@@ -225,7 +225,7 @@ export default class Builder { | |||
} | |||
|
|||
// Plugins | |||
this.plugins = Array.from(this.normalizePlugins()) | |||
this.plugins = Array.from(await this.normalizePlugins()) |
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.
Do we have to do sth. with regards to error handling here?
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.
Don't think so because that would be an user-space error?
Besides my annotation in the code, I'd like to see a more illuminating description for the PR, e.g., why introducing the change, what benefits, maybe even potential drawbacks. For other contributors (besides the core team), the description isn't helpful as is and not transparent. |
@manniL agreed, I have updated the description with more info. |
Codecov Report
@@ Coverage Diff @@
## dev #6285 +/- ##
==========================================
+ Coverage 95.71% 95.72% +<.01%
==========================================
Files 79 79
Lines 2661 2666 +5
Branches 681 683 +2
==========================================
+ Hits 2547 2552 +5
Misses 98 98
Partials 16 16
Continue to review 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.
Haha, +1 for the discord screenshot of Pooya approving the need for this hook
By request of @galvez I've added support for |
extendPlugins
option and builder:extendPlugins'
hook
Currently there's no way to determine the final ordering of user-space plugins in relation to plugins registered automatically by modules (and not all modules necessarily use
addPlugin()
, which usesunshift()
). The problem is complex and likely to have other takes, but as @pi0 said:So this introduces a new
build:extendPlugins
configuration hook, similar toextendRoutes()
, that allows users to completely modify the order of all plugins before the build.