# babel-plugin-transform-h-jsx

> Turns JSX into virtual-hyperscript

Latest version **1.0.0** (published 2016-01-18) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-01-18 |
| First published | 2016-01-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Wes Roberts |
| Maintainers | jchook |
| Keywords | babel, h, jsx, virtual-hyperscript |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-transform-h-jsx
- Repository: https://github.com/jchook/babel-plugin-transform-h-jsx
- Homepage: https://github.com/jchook/babel-plugin-transform-h-jsx#readme
- Issues: https://github.com/jchook/babel-plugin-transform-h-jsx/issues
- npm.io page: https://npm.io/package/babel-plugin-transform-h-jsx

## Dependencies (3)

- [babel-types](https://npm.io/package/babel-types.md) ^6.4.3
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^5.0.0
- [babel-plugin-syntax-jsx](https://npm.io/package/babel-plugin-syntax-jsx.md) ^6.3.13

## Alternatives

- [d3-force-3d](https://npm.io/package/d3-force-3d.md) — 1.0M weekly downloads
- [ng2-charts](https://npm.io/package/ng2-charts.md) — 486.8K weekly downloads
- [@arcgis/core](https://npm.io/package/@arcgis/core.md) — 257.8K weekly downloads
- [react-sparklines](https://npm.io/package/react-sparklines.md) — 249.3K weekly downloads
- [react-native-gifted-charts](https://npm.io/package/react-native-gifted-charts.md) — 182.3K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-01-18

## README

# JSX to Virtual Hyperscript Babel Plugin

Turns [JSX](https://facebook.github.io/react/docs/jsx-in-depth.html) into
[virtual-hyperscript](https://github.com/Matt-Esch/virtual-dom/tree/master/virtual-hyperscript)
via [Babel](https://github.com/babel/babel).

This repo is essentially `transform-react-jsx` except it passes children as an
array instead of as additional arguments. You can
[read](https://github.com/henrikjoreteg/babel-plugin-h-children-fix)
[more](https://phabricator.babeljs.io/T2034)
[about](https://github.com/substack/babel-plugin-jsx-factory) this problem if
you like.

## Installation

  npm install --save-dev babel-plugin-transform-h-jsx

## Usage

Add `transform-h-jsx` as a plugin in your babel config.

    {
      "plugins": ["transform-h-jsx"]
    }

## Options

* `pragma` (default: `'h'`)

## Webpack example

In your `webpack.config.js` file:

    module.exports = {
      output: {
        path: __dirname + "/dist/js",
        filename: "browser.js"
      },
      context: __dirname + "/src",
      entry: "./browser",
      module: {
        loaders: [
          {
            test: /\.jsx?$/,
            include: __dirname + '/src',
            loader: "babel-loader",
            query: {
              plugins: [
                ["transform-h-jsx"],
                ["syntax-jsx"]
              ]
            }
          }
        ]
      },
      resolve: {
        extensions: ['', '.js', '.jsx', '.json']
      }
    };

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