# @tarojs/helper

> Taro Helper

Latest version **4.2.1** (published 2026-07-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tarojs/helper
pnpm add @tarojs/helper
yarn add @tarojs/helper
bun add @tarojs/helper
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score; high quality score; popular repo.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 4.2.1 |
| Published | 2026-07-17 |
| First published | 2020-04-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >= 18 |
| Dependencies | 21 |
| Unpacked size | 3.3 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 37666 |
| Author | O2Team |
| Maintainers | yuche, xuanzebin, defaultlee, drchan, kyjo, qq592743779, advancedcat, baosiqing, zakary, liuzejia, vasily.cjj, hardenzheng2 |
| Keywords | taro |

## Links

- npm: https://www.npmjs.com/package/@tarojs/helper
- Repository: https://github.com/NervJS/taro
- Homepage: https://github.com/NervJS/taro#readme
- Issues: https://github.com/NervJS/taro/issues
- npm.io page: https://npm.io/package/@tarojs/helper

## Dependencies (21)

- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [debug](https://npm.io/package/debug.md) ^4.3.4
- [dotenv](https://npm.io/package/dotenv.md) ^16.4.5
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [esbuild](https://npm.io/package/esbuild.md) ~0.21.0
- [resolve](https://npm.io/package/resolve.md) ^1.22.8
- [chokidar](https://npm.io/package/chokidar.md) ^3.6.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.2.0
- [@swc/core](https://npm.io/package/@swc/core.md) 1.3.96
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.24.4
- [cross-spawn](https://npm.io/package/cross-spawn.md) ^7.0.3
- [@babel/types](https://npm.io/package/@babel/types.md) ^7.24.0
- [ansi-escapes](https://npm.io/package/ansi-escapes.md) ^4.3.2
- [@babel/parser](https://npm.io/package/@babel/parser.md) ^7.24.4
- [@swc/register](https://npm.io/package/@swc/register.md) 0.1.10
- [dotenv-expand](https://npm.io/package/dotenv-expand.md) ^11.0.6
- [@babel/traverse](https://npm.io/package/@babel/traverse.md) ^7.24.1
- [@babel/generator](https://npm.io/package/@babel/generator.md) ^7.24.4
- [require-from-string](https://npm.io/package/require-from-string.md) ^2.0.2
- [supports-hyperlinks](https://npm.io/package/supports-hyperlinks.md) ^3.0.0
- [find-yarn-workspace-root](https://npm.io/package/find-yarn-workspace-root.md) ^2.0.0

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 4.2.1 (latest) — 2026-07-17
- 4.2.2-beta.4 (beta) — 2026-09-08
- 4.2.2-alpha.2 (alpha) — 2026-09-01
- 3.6.40 (v3-latest) — 2026-04-13
- 3.6.40-beta.1 (v3-beta) — 2026-03-25
- 4.0.9-alpha.8 (test) — 2025-05-14
- 4.0.7-canary.6 (canary) — 2024-11-12
- 4.0.2 (next) — 2024-07-16
- 3.6.15-theta.0 (theta) — 2024-05-06
- 3.6.24-nightly.10 (nightly) — 2024-02-28
- 2.2.22 (2.x) — 2024-01-09
- 3.0.29 (3.0) — 2021-03-09
- 4.2.2-beta.3 — 2026-09-08
- 4.2.2-beta.1 — 2026-09-02
- 4.2.2-alpha.1 — 2026-08-24
- … 887 more at https://npm.io/package/@tarojs/helper/versions

## README

# Taro Helper

Taro 编译时工具库，主要供 CLI、编译器插件使用

tips:

执行 `build` 命令时，会把 swc-backup 文件夹里的 `.wasm` 文件移动到 swc 文件夹中，目的是为了不关注 SWC 插件的开发者无需配置 Rust 环境。但如何开发者需要修改 SWC 插件，请参考 CONTRIBUTING.md 文档中的 Rust 部分进行开发调试。

## 项目结构

``` plaintext
.
├── __tests__           # 单测
├── babelRegister.ts    # babel register，已过时
├── constants.ts        # 编译时常量
├── esbuild             # esbuild 相关工具
│   ├── index.ts
│   ├── swc-plugin.ts
│   └── utils.ts
├── index.ts
├── npm.ts              # 依赖项管理工具
├── swcRegister.ts      # swc register，通常用于加载项目的配置文件，如 app.config.js
├── terminal.ts         # 终端 Terminal 工具集
└── utils.ts            # 工具集
```

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