# @sweet-milktea/babel-preset-sweet

> babel插件

Latest version **4.6.0** (published 2025-02-26) · 0 weekly downloads

## Install

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

## Health

**Score 30/100 (F)** — status: maintenance-mode.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.6.0 |
| Published | 2025-02-26 |
| First published | 2021-01-21 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 20 |
| Unpacked size | 12.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | duan602728596 |

## Links

- npm: https://www.npmjs.com/package/@sweet-milktea/babel-preset-sweet
- Repository: https://github.com/duan602728596/sweet
- Issues: https://github.com/duan602728596/sweet/issues
- npm.io page: https://npm.io/package/@sweet-milktea/babel-preset-sweet

## Dependencies (20)

- [core-js](https://npm.io/package/core-js.md) ^3.40.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.26.9
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.26.9
- [@babel/preset-react](https://npm.io/package/@babel/preset-react.md) ^7.26.3
- [@sweet-milktea/utils](https://npm.io/package/@sweet-milktea/utils.md) ^4.0.0
- [@babel/runtime-corejs3](https://npm.io/package/@babel/runtime-corejs3.md) ^7.26.9
- [@babel/preset-typescript](https://npm.io/package/@babel/preset-typescript.md) ^7.26.0
- [babel-plugin-polyfill-corejs3](https://npm.io/package/babel-plugin-polyfill-corejs3.md) ^0.11.1
- [@babel/plugin-transform-runtime](https://npm.io/package/@babel/plugin-transform-runtime.md) ^7.26.9
- [@babel/plugin-proposal-decorators](https://npm.io/package/@babel/plugin-proposal-decorators.md) ^7.25.9
- [@babel/plugin-proposal-function-bind](https://npm.io/package/@babel/plugin-proposal-function-bind.md) ^7.25.9
- [@babel/plugin-proposal-do-expressions](https://npm.io/package/@babel/plugin-proposal-do-expressions.md) ^7.25.9
- [@babel/plugin-syntax-import-attributes](https://npm.io/package/@babel/plugin-syntax-import-attributes.md) ^7.26.0
- [@babel/plugin-proposal-pipeline-operator](https://npm.io/package/@babel/plugin-proposal-pipeline-operator.md) ^7.26.7
- [@babel/plugin-proposal-throw-expressions](https://npm.io/package/@babel/plugin-proposal-throw-expressions.md) ^7.25.9
- [@babel/plugin-transform-class-properties](https://npm.io/package/@babel/plugin-transform-class-properties.md) ^7.25.9
- [@babel/plugin-proposal-export-default-from](https://npm.io/package/@babel/plugin-proposal-export-default-from.md) ^7.25.9
- [@babel/plugin-proposal-async-do-expressions](https://npm.io/package/@babel/plugin-proposal-async-do-expressions.md) ^7.25.9
- [@babel/plugin-proposal-destructuring-private](https://npm.io/package/@babel/plugin-proposal-destructuring-private.md) ^7.26.0
- [@babel/plugin-proposal-explicit-resource-management](https://npm.io/package/@babel/plugin-proposal-explicit-resource-management.md) ^7.25.9

## Recent versions

- 4.6.0 (latest) — 2025-02-26
- 3.0.0-beta.0 (next) — 2021-05-02
- 4.4.0 — 2024-08-22
- 4.3.0 — 2024-07-27
- 4.2.1 — 2023-12-15
- 4.2.0 — 2023-12-06
- 4.1.0 — 2023-05-28
- 4.0.1 — 2022-10-14
- 4.0.0 — 2022-07-15
- 3.1.9 — 2022-02-08
- 3.1.8 — 2021-12-01
- 3.1.1 — 2021-07-30
- 3.0.5 — 2021-06-22
- 3.0.4 — 2021-06-22
- 3.0.0 — 2021-05-07
- … 4 more at https://npm.io/package/@sweet-milktea/babel-preset-sweet/versions

## README

# @sweet-milktea/babel-preset-sweet

## 插件配置

* env
    * nodeEnv `{ boolean }` : 是否为node环境
    * ecmascript `{ boolean }` : 编译到esnext
    * targets `{ object }` : 自定义babel的编译目标
    * debug `{ boolean }` : 开启debug信息
    * modules `{ boolean | string }` : 模块加载方式
    * useBuiltIns `{ boolean | string }` : useBuiltIns
* react
    * use `{ boolean }` : 是否开启react转换，默认开启
    * runtime `{ string }` : 是否使用react/jsx-runtime，默认根据react版本判断
    * development `{ boolean }`: 是否为开发环境
    * reactCompiler `{ boolean }`: 是否开启reactCompiler
* typescript
    * use `{ boolean }` : 是否开启typescript转换

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