CircularCheckRspackPlugin
Reports circular import dependencies as compilation warnings by default. This is the recommended replacement for the deprecated CircularDependencyRspackPlugin.
Example
Ignore specific warnings: when CircularCheckRspackPlugin reports warnings, you can use ignoreWarnings to suppress specific circular dependency diagnostics.
ignoreWarnings only suppresses warnings. If failOnError is true, use exclude or onDetected to control reporting instead.
Options
exclude
- Type:
RegExp - Default:
undefined
If any path in a detected cycle matches exclude, that cycle will not be reported.
include
- Type:
RegExp - Default:
undefined
When include is provided, only cycles with at least one matching path will be reported.
failOnError
- Type:
boolean - Default:
false
When true, detected cycles will generate Error level diagnostics rather than Warnings.
We recommend using the default value with ignoreWarnings to ignore specific warnings.
onDetected
- Type:
(args: { module: Module; paths: string[]; compilation: Compilation }) => void - Default:
undefined
Called once for each detected circular dependency. Using this option disables the default behavior of adding diagnostics to the compilation.
paths contains the readable unique module identifiers in the detected cycle path.

