Socket
Socket
Sign inDemoInstall

circular-dependency-plugin

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

circular-dependency-plugin - npm Package Compare versions

Comparing version 4.2.0 to 4.2.1

5

package.json

@@ -10,3 +10,6 @@ {

"description": "Detect modules with circular dependencies when bundling with webpack.",
"version": "4.2.0",
"version": "4.2.1",
"engines": {
"node": ">=6.0.0"
},
"dependencies": {},

@@ -13,0 +16,0 @@ "scripts": {

23

README.md

@@ -7,3 +7,3 @@ ## Circular Dependency Plugin

### Usage
### Basic Usage

@@ -21,7 +21,22 @@ ```js

// add errors to webpack instead of warnings
failOnError: true,
// override `exclude` and `failOnError` behavior
failOnError: true
})
]
}
```
### Advanced Usage
```js
// webpack.config.js
let CircularDependencyPlugin = require('circular-dependency-plugin')
module.exports = {
entry: "./src/index",
plugins: [
new CircularDependencyPlugin({
// `onDetected` is called for each module that is cyclical
onDetected({ paths, compilation }) {
onDetected({ module: webpackModuleRecord, paths, compilation }) {
// `paths` will be an Array of the relative module paths that make up the cycle
// `module` will be the module record generated by webpack that caused the cycle
compilation.errors.push(new Error(paths.join(' -> ')))

@@ -28,0 +43,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc