circular-dependency-plugin
Advanced tools
Comparing version 5.0.2 to 5.1.0
# Changelog | ||
## 5.1.0 | ||
* Added `include` option to allow checking only certain directories | ||
## 5.0.1 | ||
@@ -4,0 +8,0 @@ |
@@ -10,3 +10,5 @@ let path = require('path') | ||
exclude: new RegExp('$^'), | ||
include: new RegExp('.*'), | ||
failOnError: false, | ||
allowAsyncCycles: false, | ||
onDetected: false, | ||
@@ -29,3 +31,4 @@ cwd: process.cwd() | ||
module.resource == null || | ||
plugin.options.exclude.test(module.resource) | ||
plugin.options.exclude.test(module.resource) || | ||
!plugin.options.include.test(module.resource) | ||
) | ||
@@ -87,2 +90,4 @@ // skip the module if it matches the exclude pattern | ||
if (!depModule.resource) { continue } | ||
// ignore dependencies that are resolved asynchronously | ||
if (this.options.allowAsyncCycles && dependency.weak) { continue } | ||
@@ -89,0 +94,0 @@ if (depModule.debugId in seenModules) { |
@@ -13,3 +13,3 @@ { | ||
"description": "Detect modules with circular dependencies when bundling with webpack.", | ||
"version": "5.0.2", | ||
"version": "5.1.0", | ||
"engines": { | ||
@@ -16,0 +16,0 @@ "node": ">=6.0.0" |
@@ -23,4 +23,9 @@ ## Circular Dependency Plugin | ||
exclude: /a\.js|node_modules/, | ||
// include specific files based on a RegExp | ||
include: /dir/, | ||
// add errors to webpack instead of warnings | ||
failOnError: true, | ||
// allow import cycles that include an asyncronous import, | ||
// e.g. via import(/* webpackMode: "weak" */ './file.js') | ||
allowAsyncCycles: false, | ||
// set the current working directory for displaying module paths | ||
@@ -96,1 +101,5 @@ cwd: process.cwd(), | ||
``` | ||
### Maintenance | ||
This module is maintained despite few changes being necessary, please open issues if you find any bugs relating to integration with webpack core. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9426
101
104