CircularCheckRspackPlugin
Detects circular dependencies with a lightweight implementation that runs directly on Rspack's module graph. Compared with the deprecated CircularDependencyRspackPlugin, this plugin intentionally supports fewer options so it can keep runtime overhead low in large projects and watch builds.
Example
Options
failOnError
- Type:
boolean - Default:
false
When true, detected cycles emit Error diagnostics instead of Warning diagnostics.
exclude
- Type:
RegExp - Default:
undefined
Cycles containing a module resource path that matches this pattern are ignored.
Notes
CircularCheckRspackPlugin ignores dependency types that do not synchronously evaluate the target module during current module initialization, such as import(), import context dependencies, HMR accept/decline references, resolve/id-only references, and asset/CSS resource references.
For compatibility with ignoredConnections, onDetected, onIgnored, onStart, and onEnd, use the deprecated CircularDependencyRspackPlugin.

