-
-
Notifications
You must be signed in to change notification settings - Fork 102
perf: use hook filters #631
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
WalkthroughThe code refactors the plugin's internal logic to use structured filter objects with explicit include patterns and handler functions for module filtering, resolution, transformation, and loading. Constants are introduced for precomputed file paths and regex patterns, replacing repeated inline computations. The resolveId, transform, and load hooks are restructured into objects with declarative filters and handlers, but their core logic and external API remain unchanged. Additionally, a new exported function Changes
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
commit: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #631 +/- ##
=======================================
Coverage 62.35% 62.35%
=======================================
Files 32 32
Lines 3140 3140
Branches 586 586
=======================================
Hits 1958 1958
Misses 1176 1176
Partials 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/core/moduleConstants.ts (1)
39-47
: Consider adding JSDoc comments to the new utility functions.The implementation is correct, but adding JSDoc documentation would improve maintainability by explaining the purpose and parameters of these utility functions.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/core/moduleConstants.ts
(1 hunks)src/index.ts
(5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- src/index.ts
Refactor the route handling logic to utilize a hook filter, improving performance and maintainability when using Rolldown as bundler.
This should be in line with what
loadInclude
/transformInclude
does for webpack too.Related issue
e18e/ecosystem-issues#171
Summary by CodeRabbit
Summary by CodeRabbit