Skip to content

Conversation

abbasyed
Copy link

Fixes #20696

Summary

Added plugin hook filter information from the Rolldown guide to the Plugin Authors guide where it belongs.

Changes

  • Added hook filter documentation to the "Filtering (Include/Exclude Pattern)" section
  • Moved relevant content from /guide/rolldown.html#hook-filter-feature to /guide/api-plugin.html#filtering-include-exclude-pattern
  • Maintained existing documentation style and formatting

This makes the hook filter feature more discoverable for plugin authors who are reading the Plugin Authors guide.


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:**
Copy link
Contributor

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?

Suggested change
**Using Hook Filters:**
#### Using Hook Filters

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

}
```

**Backward Compatibility:**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Backward Compatibility:**
#### Backward Compatibility

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

}
```

**Utility Functions:**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Utility Functions:**
#### Utility Functions

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@TheAlexLichter
Copy link
Contributor

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)

@abbasyed
Copy link
Author

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
@abbasyed abbasyed force-pushed the docs/add-plugin-hook-filter-info branch from dedbe84 to 348c410 Compare September 17, 2025 13:25
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated as suggested!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated as suggested!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add plugin hook filter info to Plugin Authors guide
3 participants