# babel-plugin-transform-es2015-constants

> Compile ES2015 constants to ES5

Latest version **6.1.4** (published 2015-11-11) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install babel-plugin-transform-es2015-constants
pnpm add babel-plugin-transform-es2015-constants
yarn add babel-plugin-transform-es2015-constants
bun add babel-plugin-transform-es2015-constants
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 6.1.4 |
| Published | 2015-11-11 |
| First published | 2015-10-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 44016 |
| Maintainers | sebmck |
| Keywords | babel-plugin |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-transform-es2015-constants
- Repository: https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-es2015-constants
- npm.io page: https://npm.io/package/babel-plugin-transform-es2015-constants

## Dependencies (1)

- [babel-runtime](https://npm.io/package/babel-runtime.md) ^5.0.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

- 6.1.4 (latest) — 2015-11-11
- 6.0.15 — 2015-11-01
- 6.0.14 — 2015-10-30
- 6.0.2 — 2015-10-29

## README

# babel-plugin-transform-es2015-constants

Compile ES2015 constants to ES5

## Installation

```sh
$ npm install babel-plugin-transform-es2015-constants
```

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

```json
{
  "plugins": ["transform-es2015-constants"]
}
```

### Via CLI

```sh
$ babel --plugins transform-es2015-constants script.js
```

### Via Node API

```javascript
require("babel-core").transform("code", {
  plugins: ["transform-es2015-constants"]
});
```

## Note

This transform on its own will compile `const` to `let`. If you need it to compile down to `var` then you must also install and enable [`transform-es2015-block-scoping`](../babel-plugin-transform-es2015-block-scoping).

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