# babel-plugin-minify-dead-code-elimination-while-loop-fixed

> * Fork from * Fix issue

Latest version **0.3.1** (published 2022-05-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-minify-dead-code-elimination-while-loop-fixed
pnpm add babel-plugin-minify-dead-code-elimination-while-loop-fixed
yarn add babel-plugin-minify-dead-code-elimination-while-loop-fixed
bun add babel-plugin-minify-dead-code-elimination-while-loop-fixed
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.1 |
| Published | 2022-05-10 |
| First published | 2020-05-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 48.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | kingback |
| Maintainers | kingback, rax-publisher |
| Keywords | babel-plugin |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-minify-dead-code-elimination-while-loop-fixed
- Repository: https://github.com/kingback/babel-plugin-minify-dead-code-elimination-while-loop-fixed
- Homepage: https://github.com/babel/minify#readme
- Issues: https://github.com/babel/minify/issues
- npm.io page: https://npm.io/package/babel-plugin-minify-dead-code-elimination-while-loop-fixed

## Dependencies (4)

- [lodash.some](https://npm.io/package/lodash.some.md) ^4.6.0
- [babel-helper-evaluate-path](https://npm.io/package/babel-helper-evaluate-path.md) ^0.3.0
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) ^0.3.0
- [babel-helper-mark-eval-scopes](https://npm.io/package/babel-helper-mark-eval-scopes.md) ^0.3.0

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.3.1 (latest) — 2022-05-10
- 0.3.0 — 2020-05-13

## README

# babel-plugin-minify-dead-code-elimination-while-loop-fixed

* Fork from <https://github.com/babel/minify/tree/0.3.x/packages/babel-plugin-minify-dead-code-elimination>
* Fix issue <https://github.com/babel/babel/issues/11343>

Inlines bindings when possible. Tries to evaluate expressions and prunes unreachable as a result.

## Example

**In**

```javascript
function foo() {var x = 1;}
function bar() { var x = f(); }
function baz() {
  var x = 1;
  console.log(x);
  function unused() {
    return 5;
  }
}
```

**Out**

```javascript
function foo() {}
function bar() { f(); }
function baz() {
  console.log(1);
}
```

## Installation

```sh
npm install babel-plugin-minify-dead-code-elimination-while-loop-fixed
```

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

```json
// without options
{
  "plugins": ["minify-dead-code-elimination-while-loop-fixed"]
}

// with options
{
  "plugins": ["minify-dead-code-elimination-while-loop-fixed", { "optimizeRawSize": true }]
}
```

### Via CLI

```sh
babel --plugins minify-dead-code-elimination-while-loop-fixed script.js
```

### Via Node API

```javascript
require("babel-core").transform("code", {
  plugins: ["minify-dead-code-elimination-while-loop-fixed"]
});
```

## Options

+ `keepFnName` - prevent plugin from removing function name. Useful for code depending on `fn.name`
+ `keepFnArgs` - prevent plugin from removing function args. Useful for code depending on `fn.length`
+ `keepClassName` - prevent plugin from removing class name. Useful for code depending on `cls.name`
+ `tdz` - Account for TDZ (Temporal Dead Zone)

---
_Source: https://npm.io/package/babel-plugin-minify-dead-code-elimination-while-loop-fixed · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
