TikiTDO / circular-dependency-plugin

Detect circular dependencies in modules compiled with Webpack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Circular Dependency Plugin

Detect modules with circular dependencies when bundling with webpack.

Circular dependencies are often a necessity in complex software, the presence of a circular dependency doesn't always imply a bug, but in the case where the you believe a bug exists, this module may help find it.

Usage

// webpack.config.js
let CircularDependencyPlugin = require('circular-dependency-plugin')

module.exports = {
  entry: "./src/index",
  plugins: [
    new CircularDependencyPlugin({
      // exclude detection of files based on a RegExp
      exclude: /a\.js|node_modules/,
      // add errors to webpack instead of warnings
      failOnError: true
    })
  ]
}

About

Detect circular dependencies in modules compiled with Webpack

License:ISC License


Languages

Language:JavaScript 100.0%