Repository navigation
fix(webpack): find WorkerDependency where webpack 5.112 moved it - #11547
Merged
Merged
Conversation
…2 kept when it moved lib/RuntimeGlobals
|
View your CI Pipeline Execution ↗ for commit bb289b4
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
commit: |
Contributor
Author
|
Heads up @rigor789 |
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.
webpack 5.112.0 (published 2026-10-15, now
latest) movedlib/dependencies/WorkerDependencytolib/dependencies/worker/WorkerDependency. The worker loader requires the old path, so every new webpack-based project (ns createinstalls webpack^5) fails atns runwith "Cannot find module 'webpack/lib/dependencies/WorkerDependency'", and the app dies at launch.5.112 also moved
lib/RuntimeGlobalstolib/runtime/RuntimeGlobals.The loader now requires WorkerDependency at the new path, falling back to the old one, and takes
RuntimeGlobalsfrom webpack's public export (present in both).WorkerDependency.Template.prototype.apply, which the loader patches, is unchanged in 5.112.Verified with webpack 5.112.0 on a fresh
ns createapp:ns run iossyncs and runs, and a worker round trip works (the bundle carries the loader's patch).Until this ships, the workaround is
npm install -D webpack@5.111.1.