# @swc-node/core

> Faster swc nodejs binding

Latest version **1.15.0** (published 2026-07-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @swc-node/core
pnpm add @swc-node/core
yarn add @swc-node/core
bun add @swc-node/core
```

## Health

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

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.15.0 |
| Published | 2026-07-16 |
| First published | 2020-07-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >= 10 |
| Dependencies | 0 |
| Unpacked size | 47.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1981 |
| Author | LongYinan <github@lyn.one> |
| Maintainers | broooooklyn |
| Keywords | swc, babel, esbuild, rust, n-api, napi, node-rs, uglify, napi-rs, terser, webpack, ts-node, typescript, tsc |

## Links

- npm: https://www.npmjs.com/package/@swc-node/core
- Repository: https://github.com/swc-project/swc-node
- Issues: https://github.com/swc-project/swc-node/issues
- Funding: https://github.com/sponsors/Brooooooklyn
- npm.io page: https://npm.io/package/@swc-node/core

## 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

- 1.15.0 (latest) — 2026-07-16
- 1.14.1 — 2025-08-17
- 1.13.3 — 2024-07-14
- 1.13.2 — 2024-07-05
- 1.13.1 — 2024-05-01
- 1.13.0 — 2024-03-05
- 1.12.0 — 2024-02-01
- 1.10.6 — 2023-09-26
- 1.10.5 — 2023-08-18
- 1.10.4 — 2023-06-21
- 1.10.3 — 2023-04-10
- 1.10.2 — 2023-03-31
- 1.10.1 — 2023-02-15
- 1.10.0 — 2023-02-10
- 1.9.2 — 2023-01-05
- … 47 more at https://npm.io/package/@swc-node/core/versions

## README

# `@swc-node/core`

<a href="https://npmcharts.com/compare/@swc-node/core?minimal=true"><img src="https://img.shields.io/npm/dm/@swc-node/core.svg?sanitize=true" alt="Downloads" /></a>

> 🚀 Help me to become a full-time open-source developer by [sponsoring me on Github](https://github.com/sponsors/Brooooooklyn)

## Benchmark

> transform AjaxObservable.ts to ES2015 & CommonJS `JavaScript`.

```
@swc-node/core x 151 ops/sec ±3.74% (77 runs sampled)
@swc/core x 107 ops/sec ±0.51% (78 runs sampled)
esbuild x 52.89 ops/sec ±1.58% (67 runs sampled)
typescript x 21.08 ops/sec ±9.68% (40 runs sampled)
Transform rxjs/AjaxObservable.ts benchmark bench suite: Fastest is @swc-node/core
```

## Usage

```ts
export interface Options {
  target?: 'es3' | 'es5' | 'es2015' | 'es2016' | 'es2017' | 'es2018' | 'es2019' | 'es2020'
  module?: 'commonjs' | 'umd' | 'amd' | 'es6'
  sourcemap?: boolean | 'inline'
  experimentalDecorators?: boolean
  emitDecoratorMetadata?: boolean
  dynamicImport?: boolean
  esModuleInterop?: boolean
  keepClassNames?: boolean
  react?: Partial<ReactConfig>
  paths?: {
    [from: string]: [string]
  }
}

export interface ReactConfig {
  /**
   * Replace the function used when compiling JSX expressions.
   *
   * Defaults to `React.createElement`.
   */
  pragma: string
  /**
   * Replace the component used when compiling JSX fragments.
   *
   * Defaults to `React.Fragment`
   */
  pragmaFrag: string
  /**
   * Toggles whether or not to throw an error if a XML namespaced tag name is used. For example:
   * `<f:image />`
   *
   * Though the JSX spec allows this, it is disabled by default since React's
   * JSX does not currently have support for it.
   *
   */
  throwIfNamespace: boolean
  /**
   * Toggles plugins that aid in development, such as @swc/plugin-transform-react-jsx-self
   * and @swc/plugin-transform-react-jsx-source.
   *
   * Defaults to `false`,
   *
   */
  development: boolean
  /**
   * Use `Object.assign()` instead of `_extends`. Defaults to false.
   */
  useBuiltins: boolean
}

export function transformSync(
  source: string | Buffer,
  path: string,
  options?: Options,
): {
  code: string
  map: string
}

export function transform(
  source: string | Buffer,
  path: string,
  options?: Options,
): Promise<{
  code: string
  map: string
}>
```

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