# babel-plugin-transform-preact-import

> Imports preact for files containing jsx

Latest version **1.0.0** (published 2017-06-05) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install babel-plugin-transform-preact-import
pnpm add babel-plugin-transform-preact-import
yarn add babel-plugin-transform-preact-import
bun add babel-plugin-transform-preact-import
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2017-06-05 |
| First published | 2017-06-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ruben Schmidmeister |
| Maintainers | rschmidmeister |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-transform-preact-import
- npm.io page: https://npm.io/package/babel-plugin-transform-preact-import

## Recent versions

- 1.0.0 (latest) — 2017-06-05

## README

# babel-plugin-transform-preact-import

[![Build Status](https://travis-ci.org/bash/babel-plugin-transform-preact-import.svg?branch=master)](https://travis-ci.org/bash/babel-plugin-transform-preact-import)

> This plugin adds `import { h } from 'preact'` to files containing JSX

## Example

**In**

```js
const Title = (value) => <h1>{value}</h1>
```

**Out**

```js
import { h } from 'preact'
const Title = (value) => <h1>{value}</h1>
```

## Installation

```
npm install --save-dev babel-plugin-transform-preact-import
```

## Usage

### Via `.babelrc` (Recommended)

```json
{
  "plugins": [
    "transform-preact-import"
  ]
}
```

### Via CLI

```
babel --plugins babel-plugin-transform-preact-import script.js
```

### Via Node API

```js
require("babel-core").transform("code", {
  plugins: ["transform-preact-import"]
});
```

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