# @vue/babel-sugar-inject-h

> Babel syntactic sugar for h automatic injection for Vue JSX

Latest version **1.4.0** (published 2022-08-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install @vue/babel-sugar-inject-h
pnpm add @vue/babel-sugar-inject-h
yarn add @vue/babel-sugar-inject-h
bun add @vue/babel-sugar-inject-h
```

## 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.4.0 |
| Published | 2022-08-25 |
| First published | 2018-08-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1476 |
| Author | Nick Messing |
| Maintainers | nickmessing, soda, yyx990803 |

## Links

- npm: https://www.npmjs.com/package/@vue/babel-sugar-inject-h
- Repository: https://github.com/vuejs/jsx.git#master
- Homepage: https://github.com/vuejs/jsx/tree/master#readme
- Issues: https://github.com/vuejs/jsx/issues
- npm.io page: https://npm.io/package/@vue/babel-sugar-inject-h

## Dependencies (1)

- [@babel/plugin-syntax-jsx](https://npm.io/package/@babel/plugin-syntax-jsx.md) ^7.2.0

## Recent versions

- 1.4.0 (latest) — 2022-08-25
- 1.2.2 — 2020-10-17
- 1.2.1 — 2020-10-16
- 1.2.0 — 2020-10-16
- 1.1.2 — 2019-11-09
- 1.0.0 — 2019-05-08
- 1.0.0-beta.3 — 2019-03-22
- 1.0.0-beta.2 — 2019-01-11
- 1.0.0-beta.1 — 2018-12-25
- 0.1.0 — 2018-08-27

## README

## @vue/babel-sugar-inject-h

Syntactic sugar for automatic `h` inject in JSX.

### Babel Compatibility Notes

- This repo is only compatible with Babel 7.x, for 6.x please use [vuejs/babel-plugin-transform-vue-jsx](https://github.com/vuejs/babel-plugin-transform-vue-jsx)

### Usage

Install the dependencies:

```sh
# for yarn:
yarn add @vue/babel-sugar-inject-h
# for npm:
npm install @vue/babel-sugar-inject-h --save
```

In your `.babelrc`:

```json
{
  "plugins": ["@vue/babel-sugar-inject-h"]
}
```

However it is recommended to use the [configurable preset](../babel-preset-jsx/README.md) instead.

### Details

This plugin automatically injects `h` in every method that has JSX. By using this plugin you don't have to always specifically declare `h` as first parameter in your `render()` function.

```js
// Without @vue/babel-sugar-inject-h
export default {
  render (h) {
    return <button />
  }
}

// With @vue/babel-sugar-inject-h
export default {
  render () {
    return <button />
  }
}
```

---
_Source: https://npm.io/package/@vue/babel-sugar-inject-h · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
