# @repay/babel-preset

> Babel preset for front end applications

Latest version **1.2.0** (published 2024-09-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install @repay/babel-preset
pnpm add @repay/babel-preset
yarn add @repay/babel-preset
bun add @repay/babel-preset
```

## 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.0 |
| Published | 2024-09-20 |
| First published | 2019-03-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 12 |
| Unpacked size | 11 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | mcollins_repay, dhuber-repay, msoltow-repay |

## Links

- npm: https://www.npmjs.com/package/@repay/babel-preset
- Repository: https://github.com/repaygithub/ui-tools.git#master
- Homepage: https://github.com/repaygithub/ui-tools/tree/master#readme
- Issues: https://github.com/repaygithub/ui-tools/issues
- npm.io page: https://npm.io/package/@repay/babel-preset

## Dependencies (12)

- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.24.5
- [@babel/preset-react](https://npm.io/package/@babel/preset-react.md) ^7.16.7
- [@babel/preset-typescript](https://npm.io/package/@babel/preset-typescript.md) ^7.16.7
- [babel-plugin-styled-components](https://npm.io/package/babel-plugin-styled-components.md) ^2.0.4
- [@babel/plugin-transform-runtime](https://npm.io/package/@babel/plugin-transform-runtime.md) ^7.17.0
- [babel-plugin-dynamic-import-node](https://npm.io/package/babel-plugin-dynamic-import-node.md) ^2.3.3
- [@babel/plugin-syntax-dynamic-import](https://npm.io/package/@babel/plugin-syntax-dynamic-import.md) ^7.8.3
- [@babel/plugin-transform-destructuring](https://npm.io/package/@babel/plugin-transform-destructuring.md) ^7.17.3
- [@babel/plugin-proposal-private-methods](https://npm.io/package/@babel/plugin-proposal-private-methods.md) ^7.16.11
- [@babel/plugin-transform-class-properties](https://npm.io/package/@babel/plugin-transform-class-properties.md) ^7.24.1
- [@babel/plugin-proposal-object-rest-spread](https://npm.io/package/@babel/plugin-proposal-object-rest-spread.md) ^7.17.3
- [@babel/plugin-transform-private-property-in-object](https://npm.io/package/@babel/plugin-transform-private-property-in-object.md) ^7.24.5

## Recent versions

- 1.2.0 (latest) — 2024-09-20
- 0.3.0-next.0 (next) — 2019-08-21
- 0.1.2-testing (testing) — 2019-04-03
- 1.1.6 — 2024-09-20
- 1.1.5 — 2023-02-07
- 1.1.4 — 2022-03-02
- 1.1.3 — 2022-02-03
- 1.1.2 — 2021-12-09
- 1.1.1 — 2021-05-26
- 1.1.0 — 2021-03-03
- 1.0.2 — 2021-01-26
- 1.0.1 — 2020-10-15
- 1.0.0 — 2020-07-20
- 0.3.0 — 2019-08-26
- 0.2.0 — 2019-04-11
- … 3 more at https://npm.io/package/@repay/babel-preset/versions

## README

# `@repay/babel-preset`

Babel preset used by [@repaygithub](https://github.com/repaygithub/)

## Usage

Install via the command line using yarn or npm

> `@babel/core`, `@babel/runtime`, and `core-js` are peer dependencies, which means you must install them yourself.

```bash
yarn add --dev @repay/babel-preset @babel/core @babel/runtime core-js
# OR
npm install --save-dev @repay/babel-preset @babel/core @babel/runtime core-js
```

Add the preset to your .babelrc or equivalent

```.babelrc
{
  "presets": ["@repay/babel-preset"]
}
```

## EcmaScript Features Supported

- All Proposals that have reached stage-4 and are implemented by `@babel/preset-env`
- Class Properties (does not include private fields)

  ```jsx
  class Accordian extends Component {
    state = { isOpen: this.props.openOnMount || false };

    // using assignment like below,
    // `this` references the class instance always
    toggleOpen = () =>
      this.setState(s => {
        isOpen: !s.isOpen;
      });
  }
  ```

- Object rest spread (e.g. `let obj = {...props}`)

## Polyfills

There are two options you can pass to control polyfills:

- `coreJsPolyfill` (default: `false`): When this option is `true`, the [`useBuiltIns: 'usage'`](https://babeljs.io/docs/en/babel-preset-env#usebuiltins-usage) option will be passed into `@babel/preset-env` to automatically
add in only the necessary CoreJS polyfills needed.
- `regeneratorPolyfill` (default: `false`): When this option is `true`, the [`regenerator: true`](https://babeljs.io/docs/en/babel-plugin-transform-runtime#regenerator) option will be passed into the `@babel/plugin-transform-runtime` plugin.

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