-
-
Notifications
You must be signed in to change notification settings - Fork 7.2k
docs: add plugin hook filter info to Plugin Authors guide #20756
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
base: main
Are you sure you want to change the base?
Conversation
docs/guide/api-plugin.md
Outdated
|
||
Hook filters allow you to specify patterns that determine when a hook should be called, avoiding unnecessary hook invocations for files that don't match the filter criteria. | ||
|
||
**Using Hook Filters:** |
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.
Maybe also as sub heading?
**Using Hook Filters:** | |
#### Using Hook Filters |
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.
fixed
docs/guide/api-plugin.md
Outdated
} | ||
``` | ||
|
||
**Backward Compatibility:** |
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.
**Backward Compatibility:** | |
#### Backward Compatibility |
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.
fixed
docs/guide/api-plugin.md
Outdated
} | ||
``` | ||
|
||
**Utility Functions:** |
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.
**Utility Functions:** | |
#### Utility Functions |
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.
fixed @TheAlexLichter
Also to avoid duplicate content, you might want to remove it from the Rolldown guide and instead link to the new content (leave a few sentences to describe what the hook filters are there for in context with with Rolldown) |
@TheAlexLichter fixed |
- Credit Rolldown for introducing hook filter feature with link - Clarify backward compatibility requirements for Rollup/Vite - Replace utility functions section with reference to main hook filters section - Remove redundant @rolldown/pluginutils example
dedbe84
to
348c410
Compare
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.
updated as suggested!
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.
updated as suggested!
Fixes #20696
Summary
Added plugin hook filter information from the Rolldown guide to the Plugin Authors guide where it belongs.
Changes
/guide/rolldown.html#hook-filter-feature
to/guide/api-plugin.html#filtering-include-exclude-pattern
This makes the hook filter feature more discoverable for plugin authors who are reading the Plugin Authors guide.