← 输入框|github.com|刷新
Skip to content

fix(webpack): find WorkerDependency where webpack 5.112 moved it - #11547

Merged
NathanWalker merged 2 commits into
mainfrom
fix/webpack-worker-dependency
Oct 16, 2026
Merged

NathanWalker merged 2 commits into
mainfrom
fix/webpack-worker-dependency

Conversation

@NathanWalker

@NathanWalker NathanWalker commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

webpack 5.112.0 (published 2026-10-15, now latest) moved lib/dependencies/WorkerDependency to lib/dependencies/worker/WorkerDependency. The worker loader requires the old path, so every new webpack-based project (ns create installs webpack ^5) fails at ns run with "Cannot find module 'webpack/lib/dependencies/WorkerDependency'", and the app dies at launch.

5.112 also moved lib/RuntimeGlobals to lib/runtime/RuntimeGlobals.

The loader now requires WorkerDependency at the new path, falling back to the old one, and takes RuntimeGlobals from 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 create app: ns run ios syncs 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.

@nx-cloud

nx-cloud Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit bb289b4

Command Status Duration Result
nx run-many -t build -p core,webpack5,vite ✅ Succeeded 4s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-10-16 05:07:45 UTC

@pkg-pr-new

pkg-pr-new Bot commented Oct 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nativescript/core@11547
npm i https://pkg.pr.new/@nativescript/vite@11547
npm i https://pkg.pr.new/@nativescript/webpack@11547

commit: bb289b4

@NathanWalker

Copy link
Copy Markdown
Contributor Author

Heads up @rigor789

@NathanWalker
NathanWalker merged commit 1d5be2d into main Oct 16, 2026
10 checks passed
@NathanWalker
NathanWalker deleted the fix/webpack-worker-dependency branch October 16, 2026 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant