ignashevich / circular-dependency-plugin-async

Detect modules with circular dependencies asynchronously when bundling with webpack.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm version

Circular Dependency Plugin Async

Detect modules with circular dependencies asynchronously when bundling with webpack.

Basic Usage

Important

Async mode doesn't fail the webpack build so if you want your build fail during production build set isAsync: false

// webpack.config.js
const CircularDependencyPluginAsync = require("circular-dependency-plugin-async");

module.exports = {
  plugins: [
    new CircularDependencyPlugin({
      // Path to the index file of your application
      indexFilePath: "./src/index.tsx",
      // Sync/async mode flag
      isAsync: true, // optional
      // Threshold for amount of circular dependecies to trigger the error
      threshold: 1, // optional
    }),
  ],
};

About

Detect modules with circular dependencies asynchronously when bundling with webpack.

License:MIT License


Languages

Language:JavaScript 100.0%