-
Notifications
You must be signed in to change notification settings - Fork 350
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
fix(server): use cjs format hmr-client to fix hmr issue #4719
Conversation
🦋 Changeset detectedLatest commit: 9d3d064 The changes in this PR will be included in the next version bump. This PR includes changesets to release 259 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 #4719 +/- ##
==========================================
- Coverage 57.59% 50.85% -6.75%
==========================================
Files 672 690 +18
Lines 17794 19207 +1413
Branches 3876 4443 +567
==========================================
- Hits 10249 9768 -481
- Misses 6934 8690 +1756
- Partials 611 749 +138 ☔ View full report in Codecov by Sentry. |
Summary
The esm output of hmr-client is broken by esbuild, so we need to use the cjs format first.
🤖 Generated by Copilot at 9d3d064
This pull request fixes a HMR issue in the
@modern-js/server
package by using the cjs format of thehmr-client
module. It also improves the code quality and readability of thedev-middleware/index.ts
file and adds a changeset file with a Chinese translation.Details
🤖 Generated by Copilot at 9d3d064
import
andjsnext:source
fields fromexports
map of hmr-client module inpackage.json
(link)getHMRClientPath
function indev-middleware/index.ts
to use cjs entry path (link)sep
frompath
module indev-middleware/index.ts
(link)Related Issue
Checklist
pnpm run change
.