fix: guard HarmonyAcceptDependency against unresolved module ids#21302
Conversation
Skip unresolved harmony imports when matching HMR accept dependencies, fixing a WeakMap crash during CSS module HMR codegen (#21300).
🦋 Changeset detectedLatest commit: b2d5451 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
This PR is packaged and the instant preview is available (0abec4d). Install it locally:
npm i -D webpack@https://pkg.pr.new/webpack@0abec4d
yarn add -D webpack@https://pkg.pr.new/webpack@0abec4d
pnpm add -D webpack@https://pkg.pr.new/webpack@0abec4d |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #21302 +/- ##
==========================================
- Coverage 92.87% 92.85% -0.03%
==========================================
Files 594 594
Lines 64996 65214 +218
Branches 18164 18144 -20
==========================================
+ Hits 60368 60554 +186
- Misses 4628 4660 +32
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Let’s fix tests |
Merging this PR will not alter performance
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Memory | benchmark "wasm-modules-async", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' |
190.7 KB | 330 KB | -42.21% |
| ❌ | Memory | benchmark "asset-modules-bytes", scenario '{"name":"mode-development-rebuild","mode":"development","watch":true}' |
246.1 KB | 320.1 KB | -23.13% |
| ⚡ | Memory | benchmark "many-modules-esm", scenario '{"name":"mode-development","mode":"development"}' |
1.9 MB | 1.1 MB | +69.29% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing fix/harmony-accept-hmr-weak-map-key (b2d5451) with main (606712d)
Types CoverageCoverage after merging fix/harmony-accept-hmr-weak-map-key into main will be
Coverage Report |
Summary
Fixes #21300
What kind of change does this PR introduce?
fix
Did you add tests for your changes?
yes
Does this PR introduce a breaking change?
no
If relevant, what needs to be documented once your changes are merged or what have you already documented?
nothing
Use of AI
part