# @flatjs/forge-preset-babel

> ## Notes

Latest version **2.3.0** (published 2026-08-18) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.3.0 |
| Published | 2026-08-18 |
| First published | 2021-04-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=18.0.0 |
| Dependencies | 13 |
| Unpacked size | 9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | tcsk2026, tianyingchun, shunqwang |

## Links

- npm: https://www.npmjs.com/package/@flatjs/forge-preset-babel
- npm.io page: https://npm.io/package/@flatjs/forge-preset-babel

## Dependencies (13)

- [fast-async](https://npm.io/package/fast-async.md) ^7.0.6
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.28.4
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.28.4
- [@flatjs/common](https://npm.io/package/@flatjs/common.md) 2.3.0
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.28.3
- [@types/babel__core](https://npm.io/package/@types/babel__core.md) ^7.20.5
- [@babel/preset-react](https://npm.io/package/@babel/preset-react.md) ^7.27.1
- [@babel/preset-typescript](https://npm.io/package/@babel/preset-typescript.md) ^7.27.1
- [@babel/plugin-transform-classes](https://npm.io/package/@babel/plugin-transform-classes.md) ^7.28.4
- [@babel/plugin-proposal-decorators](https://npm.io/package/@babel/plugin-proposal-decorators.md) ^7.28.0
- [babel-plugin-typescript-decorators](https://npm.io/package/babel-plugin-typescript-decorators.md) ^1.0.5
- [@babel/plugin-syntax-dynamic-import](https://npm.io/package/@babel/plugin-syntax-dynamic-import.md) ^7.8.3
- [@babel/plugin-transform-class-properties](https://npm.io/package/@babel/plugin-transform-class-properties.md) ^7.27.1

## Recent versions

- 2.3.0 (latest) — 2026-08-18
- 2.3.0-next.0 (next) — 2026-08-03
- 2.2.5 — 2025-10-15
- 2.2.4 — 2025-07-03
- 2.2.4-next.1 — 2025-06-10
- 2.2.4-next.0 — 2025-05-13
- 2.2.3 — 2025-04-22
- 2.2.2 — 2025-03-31
- 2.2.1 — 2025-03-24
- 2.2.1-next.0 — 2025-03-14
- 2.2.0 — 2025-02-25
- 2.2.0-next.1 — 2025-02-10
- 2.2.0-next.0 — 2024-12-24
- 2.1.6 — 2024-12-09
- 2.1.5 — 2024-11-20
- … 91 more at https://npm.io/package/@flatjs/forge-preset-babel/versions

## README

# @flatjs/forge-preset-babel

## Notes

if you run into error `Failed to construct 'HTMLElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
e.g. https://github.com/microsoft/vscode-webview-ui-toolkit you may need to setup `@babel/plugin-transform-classes` as below shown.

```ts
// Failed to construct 'HTMLElement': Please use the 'new' operator, this DOM object constructor cannot be called as a function.
[babelPluginTransformClass, { loose: false }];
```

```ts

babelOptions: {
    plugins: [
    [
        env.resolve(import.meta.url, '@babel/plugin-transform-classes'),
        {
        loose: false,
        },
    ],
    ],
},
```

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