# @babel/preset-stage-1

> Babel preset for stage 1 plugins

Latest version **7.8.3** (published 2020-01-13) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 35/100 (D)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score; popular repo.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 7.8.3 |
| Published | 2020-01-13 |
| First published | 2017-10-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 43990 |
| Author | Sebastian McKenzie |
| Maintainers | danez, developit, existentialism, hzoo, loganfsmyth, nicolo-ribaudo |

## Links

- npm: https://www.npmjs.com/package/@babel/preset-stage-1
- Repository: https://github.com/babel/babel/tree/master/packages/babel-preset-stage-1
- Homepage: https://babeljs.io/
- npm.io page: https://npm.io/package/@babel/preset-stage-1

## Recent versions

- 7.8.3 (latest) — 2020-01-13
- 7.8.0 — 2020-01-12
- 7.0.0 — 2018-08-27
- 7.0.0-rc.4 — 2018-08-27
- 7.0.0-rc.3 — 2018-08-24
- 7.0.0-rc.2 — 2018-08-21
- 7.0.0-rc.1 — 2018-08-09
- 7.0.0-rc.0 — 2018-08-09
- 7.0.0-beta.56 — 2018-08-04
- 7.0.0-beta.55 — 2018-07-28
- 7.0.0-beta.54 — 2018-07-16
- 7.0.0-beta.53 — 2018-07-11
- 7.0.0-beta.52 — 2018-07-06
- 7.0.0-beta.51 — 2018-06-12
- 7.0.0-beta.50 — 2018-06-12
- … 21 more at https://npm.io/package/@babel/preset-stage-1/versions

## README

# @babel/preset-stage-1

As of v7.0.0-beta.55, we've removed Babel's Stage presets. Please consider reading our [blog post](https://babeljs.io/blog/2018/07/27/removing-babels-stage-presets) on this decision for more details. TL;DR is that it's more beneficial in the long run to explicitly add which proposals to use.

---

For a more automatic migration, we have updated [babel-upgrade](https://github.com/babel/babel-upgrade) to do this for you (you can run `npx babel-upgrade`).

If you want the same configuration as before:

```jsonc
{
  "plugins": [
    // Stage 1
    "@babel/plugin-proposal-export-default-from",
    "@babel/plugin-proposal-logical-assignment-operators",
    ["@babel/plugin-proposal-optional-chaining", { "loose": false }],
    ["@babel/plugin-proposal-pipeline-operator", { "proposal": "minimal" }],
    ["@babel/plugin-proposal-nullish-coalescing-operator", { "loose": false }],
    "@babel/plugin-proposal-do-expressions",

    // Stage 2
    ["@babel/plugin-proposal-decorators", { "legacy": true }],
    "@babel/plugin-proposal-function-sent",
    "@babel/plugin-proposal-export-namespace-from",
    "@babel/plugin-proposal-numeric-separator",
    "@babel/plugin-proposal-throw-expressions",

    // Stage 3
    "@babel/plugin-syntax-dynamic-import",
    "@babel/plugin-syntax-import-meta",
    ["@babel/plugin-proposal-class-properties", { "loose": true }],
    "@babel/plugin-proposal-json-strings"
  ]
}
```

If you're using the same configuration across many separate projects,
keep in mind that you can also create your own custom presets with
whichever plugins and presets you're looking to use.

```js
module.exports = function() {
  return {
    plugins: [
      require("@babel/plugin-syntax-dynamic-import"),
      [require("@babel/plugin-proposal-decorators"), { "legacy": true }],
      [require("@babel/plugin-proposal-class-properties"), { "loose": false }],
    ],
    presets: [
      // ...
    ],
  };
};
```

**NOTE: Compatibility between `@babel/plugin-proposal-class-properties` and `@babel/plugin-proposal-decorators`**
If you are including your plugins manually and using `@babel/plugin-proposal-class-properties`, make sure that `@babel/plugin-proposal-decorators` comes before `@babel/plugin-proposal-class-properties`.

When using the `legacy: true` option of `@babel/plugin-proposal-decorators`, `@babel/plugin-proposal-class-properties` must be used in `loose: true` mode.

If you are not using `@babel/plugin-proposal-decorators`, `loose` mode is not needed.

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