-
Notifications
You must be signed in to change notification settings - Fork 353
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: export loadMiddleware and loadServerMod function from plugin-se… #4569
Conversation
🦋 Changeset detectedLatest commit: 752d96c The changes in this PR will be included in the next version bump. This PR includes changesets to release 253 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov ReportPatch coverage has no change and project coverage change:
Additional details and impacted files@@ Coverage Diff @@
## main #4569 +/- ##
==========================================
- Coverage 57.59% 53.81% -3.79%
==========================================
Files 672 656 -16
Lines 17794 17982 +188
Branches 3876 4148 +272
==========================================
- Hits 10249 9677 -572
- Misses 6934 7648 +714
- Partials 611 657 +46 ☔ View full report in Codecov by Sentry. |
Summary
🤖 Generated by Copilot at 752d96c
This pull request refactors the
@modern-js/plugin-server
package to improve the code quality and readability. It extracts some common logic and types to a new fileutils.ts
, simplifies the server module loading process inserver.ts
, and adds a changeset file to document the changes.Details
🤖 Generated by Copilot at 752d96c
@modern-js/plugin-server
package (link)server.ts
file to use the utility functions and types from theutils.ts
file (link, link, link)loadMiddleware
,loadServerMod
,Hook
,Middleware
, andcompose
from theserver.ts
file for external use (link, link)utils.ts
to define and export the types and functions for loading the server module and its hooks and middlewares (link)Related Issue
Checklist
pnpm run change
.