Skip to content

ignashevich/circular-dependency-plugin-async

Repository files navigation

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published