Can Rspack Cancel Ongoing Compilation on New File Changes (Watch Mode)? #13144
Replies: 2 comments
-
|
Rspack doesn't support cancel ongoing compilation and it's no easy to support it |
Beta Was this translation helpful? Give feedback.
-
|
Yep, that's the current behavior — Rspack queues file changes during a compilation and processes them after. Cancel-on-change is blocked by a few SWC-level invariants and is non-trivial to thread through the pipeline. Partial mitigation: bump |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi team,
We’re using Rspack in dev/watch mode for a large Angular + Nx + Module Federation project.
Rebuild time is ~30 seconds. If a rebuild (A) is in progress and we modify another file (B), Rspack finishes A first and then starts a new rebuild for B. So if we edit B halfway through A, total wait becomes ~45 seconds.
Is there any option in Rspack to:
Cancel an ongoing compilation when new file changes are detected, and
Immediately restart compilation using the latest state (A + B changes)?
Or is queued rebuild the intended and only behavior in watch mode?
We’re trying to improve dev-loop efficiency for large projects.
Thanks.
Beta Was this translation helpful? Give feedback.
All reactions