# next-circular-dependency

> Detect circular dependencies in your Next.js app

Latest version **1.0.1** (published 2019-10-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install next-circular-dependency
pnpm add next-circular-dependency
yarn add next-circular-dependency
bun add next-circular-dependency
```

## Health

**Score 15/100 (F)** — status: abandoned.

Warnings: low downloads; no types; no esm support; has vulnerabilities.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2019-10-30 |
| First published | 2019-10-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 4.9 KB |
| Known vulnerabilities | 1 |
| Install scripts | no |
| GitHub stars | 4 |
| Maintainers | tiaanduplessis |
| Keywords | next, nextjs, circular-dependency, circular-dependency-plugin |

## Links

- npm: https://www.npmjs.com/package/next-circular-dependency
- Repository: https://github.com/tiaanduplessis/next-circular-dependency
- npm.io page: https://npm.io/package/next-circular-dependency

## Dependencies (1)

- [circular-dependency-plugin](https://npm.io/package/circular-dependency-plugin.md) ^5.2.0

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-10-30
- 1.0.0 — 2019-10-30

## README

# next-circular-dependency
[![package version](https://img.shields.io/npm/v/next-circular-dependency.svg?style=flat-square)](https://npmjs.org/package/next-circular-dependency)
[![package downloads](https://img.shields.io/npm/dm/next-circular-dependency.svg?style=flat-square)](https://npmjs.org/package/next-circular-dependency)
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)
[![package license](https://img.shields.io/npm/l/next-circular-dependency.svg?style=flat-square)](https://npmjs.org/package/next-circular-dependency)
[![make a pull request](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)

> Detect circular dependencies in your Next.js app

## Table of Contents

- [Usage](#usage)
- [Install](#install)
- [Contribute](#contribute)
- [License](#License)

## Usage

```js
const path = require('path')
const withCSS = require('@zeit/next-css')
const optimizedImages = require('next-optimized-images')

const withNextCircularDeps = require('next-circular-dependency')

require('dotenv').config()

module.exports =  withNextCircularDeps(optimizedImages(withCSS({
  // exclude detection of files based on a RegExp
  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
  cwd: process.cwd(),
}))
)

```


## Install

This project uses [node](https://nodejs.org) and [npm](https://www.npmjs.com).

```sh
$ npm install next-circular-dependency
$ # OR
$ yarn add next-circular-dependency
```

## Contribute

1. Fork it and create your feature branch: `git checkout -b my-new-feature`
2. Commit your changes: `git commit -am "Add some feature"`
3. Push to the branch: `git push origin my-new-feature`
4. Submit a pull request

## License

MIT

---
_Source: https://npm.io/package/next-circular-dependency · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
