# babel-plugin-transform-jsx-fragment

Latest version **0.1.5** (published 2022-11-29) · 0 weekly downloads

## Install

```sh
npm install babel-plugin-transform-jsx-fragment
pnpm add babel-plugin-transform-jsx-fragment
yarn add babel-plugin-transform-jsx-fragment
bun add babel-plugin-transform-jsx-fragment
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2022-11-29 |
| First published | 2019-07-17 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 5.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | jsx-plus |
| Maintainers | zeroling, rax-publisher |
| Keywords | babel-plugin |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-transform-jsx-fragment
- npm.io page: https://npm.io/package/babel-plugin-transform-jsx-fragment

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

- 0.1.5 (latest) — 2022-11-29
- 0.1.3-0 (beta) — 2019-11-06
- 0.1.4 — 2020-10-14
- 0.1.3 — 2020-01-06
- 0.1.2-0 — 2019-11-06
- 0.1.1 — 2019-07-17
- 0.1.0 — 2019-07-17

## README

# babel-plugin-transform-jsx-fragment



## Example

**In**

```js
export default function Foo() {
  return (<Fragment></Fragment>);
}
```

**Out**

```js
import { Fragment } from "rax";

export default function Foo() {
  return <Fragment></Fragment>;
}
```

## Installation

```sh
$ npm install babel-plugin-transform-jsx-fragment
```

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

```json
{
  "plugins": [
    ["transform-jsx-fragment", {
      "moduleName": "preact",
      "ignoreModuleCheck": false,
    }]
  ]
}
```

- moduleName: String, Optional, import module name, default to 'rax'.
- ignoreModuleCheck: Boolean, Optional, ignore checking the imported `Fragment` from same `moduleName`, default to `false`.

### Via CLI

```sh
$ babel --plugins transform-jsx-fragment script.js
```

### Via Node API

```javascript
require("babel-core").transform("code", {
  plugins: ["transform-jsx-fragment"]
});
```

---
_Source: https://npm.io/package/babel-plugin-transform-jsx-fragment · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
