Repository navigation
fix(deps): pin webpack-dev-server to 6.0.0 to stop the block editor reload loop - #846
Merged
Merged
Conversation
Adi-ty
approved these changes
Nov 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Fixes a regression from #842: under
npm startthe block editor reloads in a loop. Aditya found it on plugin-elementary#81; the theme has the same setup (wp-scripts 37,--experimental-modules,webpack-dev-server6.1.0), so it has the same bug.webpack-dev-server6.1.0 hands its browser client towebpack-dev-middleware8.4, which checkslastHash === __webpack_hash__. With--experimental-modulesthere are two compilers, so the server sends a combined hash that never equals the page's own; the client asks for ahot-update.jsonthat doesn't exist, gets a 404 and reloads. 6.0.0's client accepted a hash that contains the page's, so it is stable on the same setup. 6.1.0 is the latest release.Changes
webpack-dev-server6.0.0 indevDependencies, with"webpack-dev-server": "$webpack-dev-server"inoverrides. Both are needed: the override alone nests the pin under@wordpress/scripts, wherewebpack-clican't find it. The lockfile change is 6.1.0 → 6.0.0 plusansi-html-community0.0.8.docs/internal/maintenance.md: why the pin is there, and when and how to drop it.How I verified
edit.jschange hot-applies without a reload.currentHash.indexOf(previousHash) >= 0, andwebpack-dev-middleware8.4'sclient/process-update.jshaslastHash === __webpack_hash__.npm ls webpack-dev-servershows 6.0.0 at the top level, deduped under@wordpress/scripts.Reviewer notes
Merge before the 2.0.1 release PR (#840), so the release doesn't ship the loop.