# babel-plugin-require-jsx-image

> Automatically requires jsx images

Latest version **1.0.4** (published 2018-04-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-require-jsx-image
pnpm add babel-plugin-require-jsx-image
yarn add babel-plugin-require-jsx-image
bun add babel-plugin-require-jsx-image
```

## 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.4 |
| Published | 2018-04-02 |
| First published | 2018-04-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Daniil Veremchuk |
| Maintainers | verydanny |
| Keywords | babel, url, alias |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-require-jsx-image
- Repository: https://github.com/verydanny/babel-plugin-require-jsx-image
- Issues: https://github.com/verydanny/babel-plugin-require-jsx-image/issues
- npm.io page: https://npm.io/package/babel-plugin-require-jsx-image

## Recent versions

- 1.0.4 (latest) — 2018-04-02
- 1.0.3 — 2018-04-02
- 1.0.2 — 2018-04-02

## README

# babel-plugin-require-jsx-image

> This plugin simply converts JSX img sources to be required.

## Example

Converts image src string into require call expression. Why? So webpack aliases can be used, doesn't require converting all img sources into requires. Will not touch existing call expressions.

**In**
```js
<img src="images/logo.png" />
```
**Out**
```js
<img src={ require("images/logo.png") }>
```

## Installation

```console
$ npm install --save-dev babel-plugin-require-jsx-image
```

Add it as a plugin to your `.babelrc` file.

```js
{
  "plugins": ["require-jsx-image"]
}
```

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