fix(next): prevent createDedupeFetch wrapper accumulation across HMR cycles
Each HMR cycle previously added another createDedupeFetch wrapper around globalThis.fetch because resetFetch() restored _nextOriginalFetch (which already included a dedupe layer), then patchFetch() wrapped it in yet another dedupe layer. Add _nextPrePatchFetch to PatchedFetcher, which stores the globalThis.fetch reference from before patchFetch() applied any wrapping (pre-dedupe, pre-patch). resetFetch() now restores this reference instead, so the next patchFetch() call starts from a clean base — no wrapper accumulation.
Showing
Please
register
or
sign in
to comment