# babel-plugin-check-mutex-package

> 检测重复功能的包，比如 bizcharts 和 echarts，moment 和 dayjs

Latest version **1.2.3** (published 2023-03-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-check-mutex-package
pnpm add babel-plugin-check-mutex-package
yarn add babel-plugin-check-mutex-package
bun add babel-plugin-check-mutex-package
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.3 |
| Published | 2023-03-13 |
| First published | 2022-11-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | zfj01175080 |
| Maintainers | zhangfujin |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-check-mutex-package
- Repository: http://gitlab.sto.cn/cw/babel-plugin-check-mutex-package
- npm.io page: https://npm.io/package/babel-plugin-check-mutex-package

## Recent versions

- 1.2.3 (latest) — 2023-03-13
- 1.2.3-beta.0 — 2023-03-13
- 1.2.2-beta.4 — 2023-03-13
- 1.2.1-beta.4 — 2023-03-13
- 1.2.2-beta.2 — 2023-03-06
- 1.2.2-beta.1 — 2023-03-02
- 1.2.2 — 2023-03-02
- 1.2.1 — 2023-03-02
- 1.2.0-beta.0 — 2023-03-02
- 1.1.0 — 2022-11-29
- 1.0.0 — 2022-11-23

## README

# babel-plugin-check-mutex-package

检测重复功能的包，比如 bizcharts 和 echarts，moment 和 dayjs

## Getting started

```bash
# 安装依赖
$ yarn add babel-plugin-check-mutex-package -D
```

```js
// build.json：eg：
{
  babelPlugins: [
    + [babel-plugin-check-utils, { packages: [
    +  ['bizcharts', 'echarts'],
    +  ['moment', 'dayjs'],
    + ]}],
    [...other]
  ],
}
```
## 作用

+ 在使用了该插件后，在本地开发中如果检测到代码使用相同功能的包，则会进行警告处理

  ```js
  // bad
  import moment from 'moment';
  import dayjs from 'dayjs';

  // good
  import moment from 'moment';
  or
  import dayjs from 'dayjs';

  ```

+ 如果使用不合理继续发布到生产环境，则会中断打包,无法发布到生产

---
_Source: https://npm.io/package/babel-plugin-check-mutex-package · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
